/* Copyright (C) 2003  All Rights Reserved. */

#include "pal.h"

#include "memory.h"
#include "memmgr_config.h"
#include "memmgr.h"
/*
 *    Note - the order of each mtype in the following table must match the order
 *    followed in mtype enum declaration in memory.h
 *    The mtype id field in this table is redundant. However, it may be useful
 *    1. where the first entry in enumeration table starts with a value other than
 *    zero, 2. allows cross checkng between the index vs mtype_id
 */
static struct mtype_info mtypes[] = {

   /* temporary memory cells */
   {MTYPE_TMP,                       APN_PROTO_MAX,     TMP_STR},

   /* Hash */
   {MTYPE_HASH,                      APN_PROTO_MAX,     HASH_STR},
   {MTYPE_HASH_INDEX,                APN_PROTO_MAX,     HASH_INDEX_STR},
   {MTYPE_HASH_BUCKET,               APN_PROTO_MAX,     HASH_BUCKET_STR},

   /* Thread */
   {MTYPE_THREAD_MASTER,             APN_PROTO_MAX,     THREAD_MASTER_STR},
   {MTYPE_THREAD,                    APN_PROTO_MAX,     THREAD_STR},

   /* Linklist */
   {MTYPE_LINK_LIST,                 APN_PROTO_MAX,     LINK_LIST_STR},
   {MTYPE_LIST_NODE,                 APN_PROTO_MAX,     LIST_NODE_STR},

   /* Buffer */
   {MTYPE_BUFFER,                    APN_PROTO_MAX,     BUFFER_STR},
   {MTYPE_BUFFER_BUCKET,             APN_PROTO_MAX,     BUFFER_BUCKET_STR},
   {MTYPE_BUFFER_DATA,               APN_PROTO_MAX,     BUFFER_DATA_STR},
   {MTYPE_BUFFER_IOV,                APN_PROTO_MAX,     BUFFER_IOV_STR},

   /* Show */
   {MTYPE_SHOW,                      APN_PROTO_MAX,     SHOW_STR},
   {MTYPE_SHOW_PAGE,                 APN_PROTO_MAX,     SHOW_PAGE_STR},
   {MTYPE_SHOW_SERVER,               APN_PROTO_MAX,     SHOW_SERVER_STR},

   /* Prefix */
   {MTYPE_PREFIX,                    APN_PROTO_MAX,     PREFIX_STR},
   {MTYPE_PREFIX_IPV4,               APN_PROTO_MAX,     PREFIX_IPV4_STR},
   {MTYPE_PREFIX_IPV6,               APN_PROTO_MAX,     PREFIX_IPV6_STR},

   /* Route table */
   {MTYPE_ROUTE_TABLE,               APN_PROTO_MAX,     ROUTE_TABLE_STR},
   {MTYPE_ROUTE_NODE,                APN_PROTO_MAX,     ROUTE_NODE_STR},

   /* LS table */
   {MTYPE_LS_TABLE,                  APN_PROTO_MAX,     LS_TABLE_STR},
   {MTYPE_LS_NODE,                   APN_PROTO_MAX,     LS_NODE_STR},
   {MTYPE_LS_PREFIX,                 APN_PROTO_MAX,     LS_PREFIX_STR},

   /* QoS Resource. */
   {MTYPE_QOS_RESOURCE,              APN_PROTO_MAX,     LS_QoS_RESOURCE_STR},

   /* Vector */
   {MTYPE_VECTOR,                    APN_PROTO_MAX,     VECTOR_STR},
   {MTYPE_VECTOR_INDEX,              APN_PROTO_MAX,     VECTOR_INDEX_STR},

   /* snmp : agentx/smux */
   {MTYPE_SNMP_SUBTREE,          APN_PROTO_MAX,     SNMP_SUBTREE_STR},
   {MTYPE_SMUX_PASSWD,               APN_PROTO_MAX,     SMUX_PASSWD_STR},

   /* Host configuration. */
   {MTYPE_CONFIG,                    APN_PROTO_MAX,    CONFIG_STR},
   {MTYPE_CONFIG_MOTD,               APN_PROTO_MAX,    CONFIG_MOTD_STR},
   {MTYPE_CONFIG_LOGIN,              APN_PROTO_MAX,    CONFIG_LOGIN_STR},
   {MTYPE_CONFIG_PASSWORD,           APN_PROTO_MAX,    CONFIG_PASSWD_STR},

   /* IMI client.  */
   {MTYPE_IMI_CLIENT,                APN_PROTO_MAX,    IMI_CLIENT_STR},

   /* Interface database. */
   {MTYPE_IF_DB,                     APN_PROTO_MAX,    IF_DB_STR},

   /* Memory globals. */
   {MTYPE_MEMORY_GLOBALS,            APN_PROTO_MAX,    MEMORY_GLOBALS_STR},

   /* VTY */
   {MTYPE_VTY_MASTER,                APN_PROTO_MAX,    VTY_MASTER_STR},
   {MTYPE_VTY,                       APN_PROTO_MAX,    VTY_STR},
   {MTYPE_VTY_HIST,                  APN_PROTO_MAX,    VTY_HIST_STR},
   {MTYPE_VTY_PATH,                  APN_PROTO_MAX,    VTY_PATH_STR},
   {MTYPE_VTY_OUT_BUF,               APN_PROTO_MAX,    VTY_OUT_BUF_STR},
   {MTYPE_IF,                        APN_PROTO_MAX,    IF_STR},
   {MTYPE_CONNECTED,                 APN_PROTO_MAX,    CONNECTED_STR},
   {MTYPE_STREAM,                    APN_PROTO_MAX,    STREAM_STR},
   {MTYPE_STREAM_DATA,               APN_PROTO_MAX,    STREAM_DATA_STR},
   {MTYPE_STREAM_FIFO,               APN_PROTO_MAX,    STREAM_FIFO_STR},

   /* Label pool */
   {MTYPE_LABEL_POOL_SERVER,         APN_PROTO_MAX,    LABEL_POOL_SERVER_STR},
   {MTYPE_LABEL_POOL_CLIENT,         APN_PROTO_MAX,    LABEL_POOL_CLIENT_STR},
   {MTYPE_LABEL_POOL_GENERIC_LABEL,  APN_PROTO_MAX,    LABEL_POOL_GEN_LBL_STR},
   {MTYPE_LABEL_SET_NODE,            APN_PROTO_MAX,    LABEL_POOL_LSET_STR},

   /* Stream Socket Control Block */
   {MTYPE_SSOCK_CB,                  APN_PROTO_MAX,    SSOCK_CB_STR},
   /* Circular Queue Buffer */
   {MTYPE_CQUEUE_BUF,                APN_PROTO_MAX,    CQUEUE_BUF_STR},

   /* Access list */
   {MTYPE_ACCESS_LIST,               APN_PROTO_MAX,    ACCESS_LIST_STR},
   {MTYPE_ACCESS_LIST_STR,           APN_PROTO_MAX,    ACCESS_LIST_STR2},
   {MTYPE_ACCESS_FILTER,             APN_PROTO_MAX,    ACCESS_FILTER_STR},

   /* Prefix list */
   {MTYPE_PREFIX_LIST,               APN_PROTO_MAX,    PREFIX_LIST_STR},
   {MTYPE_PREFIX_LIST_STR,           APN_PROTO_MAX,    PREFIX_LIST_STR_STR},
   {MTYPE_PREFIX_LIST_ENTRY,         APN_PROTO_MAX,    PREFIX_LIST_ENTRY_STR},
   {MTYPE_PREFIX_LIST_DESC,          APN_PROTO_MAX,    PREFIX_LIST_DESC_STR},

   /* Route map */
   {MTYPE_ROUTE_MAP,                 APN_PROTO_MAX,    ROUTE_MAP_STR},
   {MTYPE_ROUTE_MAP_NAME,            APN_PROTO_MAX,    ROUTE_MAP_NAME_STR},
   {MTYPE_ROUTE_MAP_INDEX,           APN_PROTO_MAX,    ROUTE_MAP_INDEX_STR},
   {MTYPE_ROUTE_MAP_RULE,            APN_PROTO_MAX,    ROUTE_MAP_RULE_STR},
   {MTYPE_ROUTE_MAP_RULE_STR,        APN_PROTO_MAX,    ROUTE_MAP_RULE_STR_STR},
   {MTYPE_ROUTE_MAP_COMPILED,        APN_PROTO_MAX,    ROUTE_MAP_COMPILED_STR},
#ifdef HAVE_PBR
   {MTYPE_PBR_NEXTHOP,               APN_PROTO_MAX,    PBR_NEXTHOP_STR},
   {MTYPE_PBR_STRING,                APN_PROTO_MAX,    PBR_STRING_STR},
   {MTYPE_ROUTE_MAP_PBR_IF,          APN_PROTO_MAX,    ROUTE_MAP_PBR_IF_STR},       
#endif /* HAVE_PBR */

   /* VR data */
   {MTYPE_VRF_NAME,                  APN_PROTO_UNSPEC, VRF_NAME_STR},

   /* Keys */
   {MTYPE_KEYCHAIN,                  APN_PROTO_MAX,    KEYCHAIN_STR},
   {MTYPE_KEYCHAIN_NAME,             APN_PROTO_MAX,    KEYCHAIN_NAME_STR},
   {MTYPE_KEY,                       APN_PROTO_MAX,    KEY_STR},
   {MTYPE_KEY_STRING,                APN_PROTO_MAX,    KEY_STRING_STR},

   /* Bit map */
   {MTYPE_BITMAP,                    APN_PROTO_MAX,    BITMAP_STR},
   {MTYPE_BITMAP_BLOCK,              APN_PROTO_MAX,    BITMAP_BLOCK_STR},
   {MTYPE_BITMAP_BLOCK_ARRAY,        APN_PROTO_MAX,    BITMAP_BLOCK_ARRAY_STR},
   {MTYPE_STRING_BUFF,               APN_PROTO_MAX,    STRING_BUFF_STR},

   /* Ptree */
   {MTYPE_PTREE,                     APN_PROTO_MAX,    PTREE_STR},
   {MTYPE_PTREE_NODE,                APN_PROTO_MAX,    PTREE_NODE_STR},

   /* Avl tree */
   {MTYPE_AVL_TREE,                  APN_PROTO_MAX,    AVL_TREE_STR},
   {MTYPE_AVL_TREE_NODE,             APN_PROTO_MAX,    AVL_TREE_NODE_STR},

  /* Binary Heap */
   {MTYPE_BINARY_HEAP,               APN_PROTO_MAX,    BINARY_HEAP_STR},
   {MTYPE_BINARY_HEAP_ARRAY,         APN_PROTO_MAX,    BINARY_HEAP_ARRAY_STR},

   /* Redundancy data */
   {MTYPE_RMM,                       APN_PROTO_MAX,    RMM_STR},
   {MTYPE_RMM_MSG,                   APN_PROTO_MAX,    RMM_MSG_STR},
   {MTYPE_RMM_TMP,                   APN_PROTO_MAX,    RMM_TMP_STR},

#ifdef HAVE_TUNNEL
   {MTYPE_TUNNEL_IF,                 APN_PROTO_MAX,    TUNNEL_IF_STR},
#endif

#ifdef HAVE_GMPLS
   /* GMPLS data */
   {MTYPE_GMPLS_IF,                  APN_PROTO_MAX,    GMPLS_IF_STR},
   {MTYPE_GMPLS_IF_DESC,             APN_PROTO_MAX,    GMPLS_IF_DESC_STR},
   {MTYPE_GMPLS_SRLG,                APN_PROTO_MAX,    GMPLS_SRLG_STR},
   {MTYPE_DATALINK,                  APN_PROTO_MAX,    GMPLS_DL_STR},
   {MTYPE_TELINK,                    APN_PROTO_MAX,    GMPLS_TEL_STR},
   {MTYPE_CONTROL_CHANNEL,           APN_PROTO_MAX,    GMPLS_CC_STR},
   {MTYPE_CONTROL_ADJ,               APN_PROTO_MAX,    GMPLS_CADJ_STR},
   {MTYPE_GMPLS_LINK_ID,	     APN_PROTO_MAX,    GMPLS_LINK_ID_STR},
   {MTYPE_LINK_PROP,    	     APN_PROTO_MAX,    GMPLS_LINK_PROP_STR},
   {MTYPE_GMPLS_BIDIR,               APN_PROTO_MAX,    GMPLS_BIDIR_STR},
#endif

   /* Messaging. */
   {MTYPE_MESSAGE_ENTRY,             APN_PROTO_MAX,    MESSAGE_ENTRY_STR},
   {MTYPE_MESSAGE_HANDLER,           APN_PROTO_MAX,    MESSAGE_HANDLER_STR},

   /* NSM messaging. */
   {MTYPE_NSM_MSG_NEXTHOP_IPV4,      APN_PROTO_NSM,    NSM_MSG_NEXTHOP_IPV4_STR},
   {MTYPE_NSM_MSG_NEXTHOP_IPV6,      APN_PROTO_NSM,    NSM_MSG_NEXTHOP_IPV6_STR},
   {MTYPE_NSM_CLIENT_HANDLER,        APN_PROTO_NSM,    NSM_CLIENT_HANDLER_STR},
   {MTYPE_NSM_CLIENT,                APN_PROTO_NSM,    NSM_CLIENT_STR},
   {MTYPE_NSM_SERVER_ENTRY,          APN_PROTO_NSM,    NSM_SERVER_ENTRY_STR},
   {MTYPE_NSM_SERVER_CLIENT,         APN_PROTO_NSM,    NSM_SERVER_CLIENT_STR},
   {MTYPE_NSM_SERVER,                APN_PROTO_NSM,    NSM_SERVER_STR},
   {MTYPE_NSM_PENDING_MSG,           APN_PROTO_NSM,    NSM_PENDING_MSG_STR},
   {MTYPE_NSM_MSG_LABEL_POOL,        APN_PROTO_NSM,    NSM_MSG_LABEL_POOL_STR},

   /* NSM redistribution */
   {MTYPE_NSM_REDISTRIBUTE,          APN_PROTO_NSM,    NSM_REDISTRIBUTE_STR},

   /* NSM Route table */
   {MTYPE_NSM_PTREE_TABLE,           APN_PROTO_NSM,    NSM_PTREE_TABLE_STR},
   {MTYPE_NSM_PTREE_NODE,            APN_PROTO_NSM,    NSM_PTREE_NODE_STR},

   /* NSM Nexthop registration/deregistration info. */
   {MTYPE_NSM_NEXTHOP_LOOKUP_REG,    APN_PROTO_NSM,    NSM_NEXTHOP_LOOKUP_REG_STR},
   {MTYPE_NSM_SNMP_ROUTE_ENTRY,      APN_PROTO_NSM,    NSM_SNMP_ROUTE_ENTRY_STR},

   /* NSM ARP entry configuration*/
   {MTYPE_NSM_ARP_MASTER,            APN_PROTO_NSM,    NSM_ARP_MASTER_STR},
   {MTYPE_NSM_ARP_STATIC_ENTRY,      APN_PROTO_NSM,    NSM_ARP_STATIC_ENTRY_STR},
#ifdef HAVE_IPV6
   {MTYPE_NSM_IPV6_STATIC_NBR_ENTRY, APN_PROTO_NSM,    MTYPE_NSM_IPV6_STATIC_NBR_ENTRY_STR},
#endif /* HAVE_IPV6 */

   /* RIP */
   {MTYPE_RIP,                       APN_PROTO_RIP,    RIP_STR},
   {MTYPE_RIP_NAME,                  APN_PROTO_RIP,    RIP_NAME_STR},
   {MTYPE_RIP_INFO,                  APN_PROTO_RIP,    RIP_INFO_STR},
   {MTYPE_RIP_IF,                    APN_PROTO_RIP,    RIP_IF_STR},
   {MTYPE_RIP_IF_NAME,               APN_PROTO_RIP,    RIP_IF_NAME_STR},
   {MTYPE_RIP_IF_PARAMS,             APN_PROTO_RIP,    RIP_IF_PARAMS_STR},
   {MTYPE_RIP_PASSIVE_IF,            APN_PROTO_RIP,    RIP_PASSIVE_IF_STR},
   {MTYPE_RIP_PEER,                  APN_PROTO_RIP,    RIP_PEER_STR},
   {MTYPE_RIP_OFFSET_LIST,           APN_PROTO_RIP,    RIP_OFFSET_LIST_STR},
   {MTYPE_RIP_OFFSET_IF_NAME,        APN_PROTO_RIP,    RIP_OFFSET_IF_NAME_STR},
   {MTYPE_RIP_OFFSET_ALIST,          APN_PROTO_RIP,    RIP_OFFSET_ALIST_STR},
   {MTYPE_RIP_DISTANCE,              APN_PROTO_RIP,    RIP_DISTANCE_STR},
   {MTYPE_RIP_DISTANCE_ALIST,        APN_PROTO_RIP,    RIP_DISTANCE_ALIST_STR},
   {MTYPE_RIP_RMAP_COMPILED,         APN_PROTO_RIP,    RIP_RMAP_COMPILED_STR},
   {MTYPE_RIP_RMAP_NAME,             APN_PROTO_RIP,    RIP_RMAP_NAME_STR},
   {MTYPE_RIP_AUTH_STRING,           APN_PROTO_RIP,    RIP_AUTH_STRING_STR},
   {MTYPE_RIP_KEY_CHAIN,             APN_PROTO_RIP,    RIP_KEY_CHAIN_STR},
   {MTYPE_RIP_NH,                    APN_PROTO_RIP,    RIP_NEXTHOP_STR},

   /* RIPng */
   {MTYPE_RIPNG,                     APN_PROTO_RIPNG,  RIPNG_STR},
   {MTYPE_RIPNG_NAME,                APN_PROTO_RIPNG,  RIPNG_NAME_STR},
   {MTYPE_RIPNG_INFO,                APN_PROTO_RIPNG,  RIPNG_INFO_STR},
   {MTYPE_RIPNG_AGGREGATE,           APN_PROTO_RIPNG,  RIPNG_AGGREGATE_STR},
   {MTYPE_RIPNG_IF,                  APN_PROTO_RIPNG,  RIPNG_IF_STR},
   {MTYPE_RIPNG_IF_NAME,             APN_PROTO_RIPNG,  RIPNG_IF_NAME_STR},
   {MTYPE_RIPNG_IF_PARAMS,           APN_PROTO_RIPNG,  RIPNG_IF_PARAMS_STR},
   {MTYPE_RIPNG_NBR,                 APN_PROTO_RIPNG,  RIPNG_NBR_STR},
   {MTYPE_RIPNG_NBR_IF,              APN_PROTO_RIPNG,  RIPNG_NBR_IF_STR},
   {MTYPE_RIPNG_PASSIVE_IF,          APN_PROTO_RIPNG,  RIPNG_PASSIVE_IF_STR},
   {MTYPE_RIPNG_OFFSET_LIST,         APN_PROTO_RIPNG,  RIPNG_OFFSET_LIST_STR},
   {MTYPE_RIPNG_OFFSET_IF_NAME,      APN_PROTO_RIPNG,  RIPNG_OFFSET_IF_NAME_STR},
   {MTYPE_RIPNG_OFFSET_ALIST,        APN_PROTO_RIPNG,  RIPNG_OFFSET_ALIST_STR},
   {MTYPE_RIPNG_RMAP_COMPILED,       APN_PROTO_RIPNG,  RIPNG_RMAP_COMPILED_STR},
   {MTYPE_RIPNG_RMAP_NAME,           APN_PROTO_RIPNG,  RIPNG_RMAP_NAME_STR},
   {MTYPE_RIPNG_DISTANCE,            APN_PROTO_RIPNG,  RIPNG_DISTANCE_STR},
   {MTYPE_RIPNG_DISTANCE_ALIST,      APN_PROTO_RIPNG,  RIPNG_DISTANCE_ALIST_STR},

   /* BGP */
   {MTYPE_BGP,                       APN_PROTO_BGP,    BGP_STR},
   {MTYPE_BGP_VR,                    APN_PROTO_BGP,    BGP_VR_STR},
   {MTYPE_BGP_GLOBAL,                APN_PROTO_BGP,    BGP_GLOBAL_STR},
   {MTYPE_BGP_PEER,                  APN_PROTO_BGP,    BGP_PEER_STR},
   {MTYPE_BGP_PEER_CONF,             APN_PROTO_BGP,    BGP_PEER_CONF_STR},
   {MTYPE_BGP_PEER_GROUP,            APN_PROTO_BGP,    BGP_PEER_GROUP_STR},
   {MTYPE_BGP_PEER_NOTIFY_DATA,      APN_PROTO_BGP,    BGP_PEER_NOTIFY_DATA_STR},
   {MTYPE_BGP_ROUTE,                 APN_PROTO_BGP,    BGP_ROUTE_STR},
   {MTYPE_BGP_STATIC,                APN_PROTO_BGP,    BGP_STATIC_STR},
   {MTYPE_BGP_AGGREGATE,             APN_PROTO_BGP,    BGP_AGGREGATE_STR},
   {MTYPE_BGP_MPCAP,                 APN_PROTO_BGP,    BGP_MPCAP_STR},
   {MTYPE_BGP_ADJACENCY,             APN_PROTO_BGP,    BGP_ADJACENCY_STR},
   {MTYPE_BGP_ADVERTISE,             APN_PROTO_BGP,    BGP_ADVERTISE_STR},
   {MTYPE_BGP_ADVERTISE_ATTR,        APN_PROTO_BGP,    BGP_ADVERTISE_ATTR_STR},
   {MTYPE_BGP_ADJ_IN,                APN_PROTO_BGP,    BGP_ADJ_IN_STR},
   {MTYPE_ATTR,                      APN_PROTO_BGP,    ATTR_STR},
   {MTYPE_AS_PATH,                   APN_PROTO_BGP,    AS_PATH_STR},
   {MTYPE_AS_SEG,                    APN_PROTO_BGP,    AS_SEG_STR},
   {MTYPE_AS_STR,                    APN_PROTO_BGP,    AS_STR_STR},
   {MTYPE_COMMUNITY,                 APN_PROTO_BGP,    COMMUNITY_STR},
   {MTYPE_COMMUNITY_VAL,             APN_PROTO_BGP,    COMMUNITY_VAL_STR},
   {MTYPE_COMMUNITY_STR,             APN_PROTO_BGP,    COMMUNITY_STR_STR},
   {MTYPE_COMMUNITY_LIST_CONFIG,     APN_PROTO_BGP,    COMMUNITY_LIST_CONFIG_STR},
   {MTYPE_COMMUNITY_LIST_NAME,       APN_PROTO_BGP,    COMMUNITY_LIST_NAME_STR},
   {MTYPE_ECOMMUNITY,                APN_PROTO_BGP,    ECOMMUNITY_STR},
   {MTYPE_ECOMMUNITY_VAL,            APN_PROTO_BGP,    ECOMMUNITY_VAL_STR},
   {MTYPE_ECOMMUNITY_STR,            APN_PROTO_BGP,    ECOMMUNITY_STR_STR},
   {MTYPE_CLUSTER,                   APN_PROTO_BGP,    CLUSTER_STR},
   {MTYPE_CLUSTER_VAL,               APN_PROTO_BGP,    CLUSTER_VAL_STR},
   {MTYPE_TRANSIT,                   APN_PROTO_BGP,    TRANSIT_STR},
   {MTYPE_TRANSIT_VAL,               APN_PROTO_BGP,    TRANSIT_VAL_STR},
   {MTYPE_AS_LIST,                   APN_PROTO_BGP,    AS_LIST_STR},
   {MTYPE_AS_LIST_MASTER,            APN_PROTO_BGP,    AS_LIST_MASTER_STR},
   {MTYPE_AS_FILTER,                 APN_PROTO_BGP,    AS_FILTER_STR},
   {MTYPE_AS_FILTER_STR,             APN_PROTO_BGP,    AS_FILTER_STR_STR},
   {MTYPE_COMMUNITY_LIST_HANDLER,    APN_PROTO_BGP,    COMMUNITY_LIST_HANDLER_STR},
   {MTYPE_COMMUNITY_LIST,            APN_PROTO_BGP,    COMMUNITY_LIST_STR},
   {MTYPE_COMMUNITY_LIST_ENTRY,      APN_PROTO_BGP,    COMMUNITY_LIST_ENTRY_STR},
   {MTYPE_COMMUNITY_REGEXP,          APN_PROTO_BGP,    COMMUNITY_REGEXP_STR},
   {MTYPE_BGP_CONFED_LIST,           APN_PROTO_BGP,    BGP_CONFED_LIST_STR},
   {MTYPE_BGP_DISTANCE,              APN_PROTO_BGP,    BGP_DISTANCE_STR},
   {MTYPE_BGP_NEXTHOP_CACHE,         APN_PROTO_BGP,    BGP_NEXTHOP_CACHE_STR},
   {MTYPE_BGP_RFD_HINFO,             APN_PROTO_BGP,    BGP_RFD_HINFO_STR},
   {MTYPE_BGP_RFD_DECAY_ARRAY,       APN_PROTO_BGP,    BGP_RFD_DECAY_ARRAY_STR},
   {MTYPE_BGP_RFD_REUSE_LIST_ARRAY,  APN_PROTO_BGP,    BGP_RFD_REUSE_LIST_ARRAY_STR},
   {MTYPE_BGP_RFD_CB,                APN_PROTO_BGP,    BGP_RFD_CB_STR},
   {MTYPE_BGP_RFD_CFG,               APN_PROTO_BGP,    BGP_RFD_CFG_STR},
   {MTYPE_BGP_TABLE,                 APN_PROTO_BGP,    BGP_TABLE_STR},
   {MTYPE_BGP_NODE,                  APN_PROTO_BGP,    BGP_NODE_STR},
   {MTYPE_BGP_WALKER,                APN_PROTO_BGP,    BGP_WALKER_STR},
   {MTYPE_PEER_UPDATE_SOURCE,        APN_PROTO_BGP,    PEER_UPDATE_SOURCE_STR},
   {MTYPE_PEER_DESC,                 APN_PROTO_BGP,    PEER_DESC_STR},
   {MTYPE_BGP_VRF,                   APN_PROTO_BGP,    BGP_VRF_STR},
   {MTYPE_BGP_DUMP,                  APN_PROTO_BGP,    BGP_DUMP_STR},
   {MTYPE_BGP_MPLS_LABEL_REQ,        APN_PROTO_BGP,    BGP_MPLS_LABEL_REQ_STR},
#ifdef HAVE_EXT_CAP_ASN
   {MTYPE_AS4_PATH,                  APN_PROTO_BGP,    AS4_PATH_STR},
   {MTYPE_AS4_SEG,                   APN_PROTO_BGP,    AS4_SEG_STR},
   {MTYPE_AS4_STR,                   APN_PROTO_BGP,    AS4_STR_STR},
#endif
   {MTYPE_PEER_BGP_NODE,             APN_PROTO_BGP,    PEER_BGP_NODE_STR},

   /* NSM / pacos */
   {MTYPE_NSM_GLOBAL,                APN_PROTO_NSM,    NSM_GLOBAL_STR},
   {MTYPE_NSM_MASTER,                APN_PROTO_NSM,    NSM_MASTER_STR},
   {MTYPE_NSM_DESC,                  APN_PROTO_NSM,    NSM_DESC_STR},
   {MTYPE_NSM_RIB,                   APN_PROTO_NSM,    NSM_RIB_STR},
   {MTYPE_NSM_VRF,                   APN_PROTO_NSM,    NSM_VRF_STR},
   {MTYPE_NEXTHOP,                   APN_PROTO_NSM,    NEXTHOP_STR},
   {MTYPE_NSM_STATIC,                APN_PROTO_NSM,    NSM_STATIC_STR},
#ifdef HAVE_BFD
   {MTYPE_NSM_BFD_STATIC_SESSION,    APN_PROTO_NSM,    NSM_BFD_STATIC_STR},
#endif /* HAVE_BFD */
   {MTYPE_NSM_IF,                    APN_PROTO_NSM,    NSM_IF_STR},
   {MTYPE_NSM_IFNAME,                APN_PROTO_NSM,    NSM_IFNAME_STR},
   {MTYPE_NSM_IF_PARAMS,             APN_PROTO_NSM,    NSM_IF_PARAMS_STR},
   {MTYPE_NSM_PW,                    APN_PROTO_NSM,    NSM_PW_STR},
   {MTYPE_NSM_SI,                    APN_PROTO_NSM,    NSM_SI_STR},
   {MTYPE_NSM_AC,                    APN_PROTO_NSM,    NSM_AC_STR},
   {MTYPE_NSM_TUN,                    APN_PROTO_NSM,    NSM_TUN_STR},
   {MTYPE_NSM_RPORT,                    APN_PROTO_NSM,    NSM_RPORT_STR},
   {MTYPE_NSM_MEG,                    APN_PROTO_NSM,    NSM_MEG_STR},  
   {MTYPE_NSM_STACK,                    APN_PROTO_NSM,    NSM_STACK_STR},
   {MTYPE_NSM_STAGGER_NODE,          APN_PROTO_NSM,    NSM_STAGGER_NODE_STR},
   {MTYPE_NSM_RESTART_OPTION,        APN_PROTO_NSM,    NSM_RESTART_OPTION_STR},
   {MTYPE_NSM_MSG_QUEUE,             APN_PROTO_NSM,    NSM_MSG_QUEUE_STR},
   {MTYPE_NSM_MSG_QUEUE_BUF,         APN_PROTO_NSM,    NSM_MSG_QUEUE_BUF_STR},
   {MTYPE_RTADV,                     APN_PROTO_NSM,    RTADV_STR},
   {MTYPE_RTADV_IF,                  APN_PROTO_NSM,    RTADV_IF_STR},
   {MTYPE_RTADV_PREFIX,              APN_PROTO_NSM,    RTADV_PREFIX_STR},
   {MTYPE_RTADV_HOME_AGENT,          APN_PROTO_NSM,    RTADV_HOME_AGENT_STR},
   {MTYPE_NSM_MPLS,                  APN_PROTO_NSM,    NSM_MPLS_STR},
   {MTYPE_NSM_MPLS_IF,               APN_PROTO_NSM,    NSM_MPLS_IF_STR},
   {MTYPE_NSM_LABEL_SPACE,           APN_PROTO_NSM,    NSM_LABEL_SPACE_STR},
   {MTYPE_NSM_QOS_IF,                APN_PROTO_NSM,    NSM_QOS_IF_STR},
   {MTYPE_NSM_STATIC_DESC,            APN_PROTO_NSM,    NSM_STATIC_DESCRIPTION},
#ifdef HAVE_VLAN
   {MTYPE_NSM_VLAN_BMP,              APN_PROTO_NSM,    "NSM VLAN Bitmap"},
#endif /* HAVE_VLAN */
#ifdef HAVE_MPLS_VC
   {MTYPE_NSM_VIRTUAL_CIRCUIT,       APN_PROTO_NSM,    NSM_VIRTUAL_CIRCUIT_STR},
   {MTYPE_NSM_VC_CONTAINER,          APN_PROTO_NSM,    NSM_VC_CONTAINER_STR},
   {MTYPE_NSM_VC_GROUP,              APN_PROTO_NSM,    NSM_VC_GROUP_STR},
   {MTYPE_NSM_VC_FIB,                APN_PROTO_NSM,    NSM_VC_FIB_STR},
   {MTYPE_NSM_VC_PERF_CNTR,          APN_PROTO_NSM,    MTYPE_NSM_VC_PERF_CNTR_STR},
#endif

#ifdef HAVE_VPLS
   {MTYPE_NSM_VPLS,                  APN_PROTO_NSM,    NSM_VPLS_STR},
   {MTYPE_NSM_VPLS_PEER,             APN_PROTO_NSM,    NSM_VPLS_PEER_STR},
   {MTYPE_NSM_VPLS_SPOKE_VC,         APN_PROTO_NSM,    NSM_VPLS_SPOKE_VC_STR},
#endif
   {MTYPE_NSM_LSP_DEP_CONFIRM,       APN_PROTO_NSM,    NSM_LSP_DEP_CONFIRM_STR},
   {MTYPE_MPLS_CONFIRM_LIST,         APN_PROTO_NSM,    MPLS_CONFIRM_LIST_STR},
   {MTYPE_MPLS_FTN_ENTRY,            APN_PROTO_NSM,    MPLS_FTN_ENTRY_STR},
   {MTYPE_MPLS_ILM_ENTRY,            APN_PROTO_NSM,    MPLS_ILM_ENTRY_STR},
   {MTYPE_MPLS_XC_ENTRY,             APN_PROTO_NSM,    MPLS_XC_ENTRY_STR},
   {MTYPE_MPLS_NHLFE_ENTRY,          APN_PROTO_NSM,    MPLS_NHLFE_ENTRY_STR},
   {MTYPE_MPLS_MAPPED_ROUTE,         APN_PROTO_NSM,    MPLS_MAPPED_ROUTE_STR},
   {MTYPE_MPLS_MAPPED_LSP_ENTRY,     APN_PROTO_NSM,    MPLS_MAPPED_LSP_ENTRY_STR},
   {MTYPE_NSM_MPLS_VRF_TABLE,        APN_PROTO_NSM,    NSM_MPLS_VRF_TABLE_STR},
#ifdef HAVE_BFD
   {MTYPE_NSM_MPLS_BFD_CONF,         APN_PROTO_NSM,    NSM_MPLS_BFD_CONF_STR},
#endif /* HAVE_BFD */
#ifdef HAVE_HAL
   {MTYPE_NSM_HAL_TLV_DECODE,        APN_PROTO_NSM,    NSM_HAL_TLV_DECODE_STR},
#endif /* HAVE_HAL */
#ifdef HAVE_MCAST_IPV4
   {MTYPE_NSM_MCAST,              APN_PROTO_NSM,    NSM_MCAST_STR},
   {MTYPE_NSM_MCAST_VIF,          APN_PROTO_NSM,    NSM_MCAST_VIF_STR},
   {MTYPE_NSM_MCAST_MRT,          APN_PROTO_NSM,    NSM_MCAST_MRT_STR},
   {MTYPE_NSM_MCAST_MRT_OLIST,    APN_PROTO_NSM,    NSM_MCAST_MRT_OLIST_STR},
   {MTYPE_NSM_MCAST_STAT_BLOCK,   APN_PROTO_NSM,    NSM_MCAST_ST_BLK_STR},
   {MTYPE_NSM_MCAST_MRT_REG,      APN_PROTO_NSM,    NSM_MCAST_MRT_REG_STR},
   {MTYPE_NSM_MCAST_TUN_CONF,     APN_PROTO_NSM,    NSM_MCAST_TUN_CONF_STR},
   {MTYPE_NSM_MTRACE_STATE,       APN_PROTO_NSM,    NSM_MTRACE_STATE_STR},
   {MTYPE_NSM_MTRACE_PKT,         APN_PROTO_NSM,    NSM_MTRACE_PKT_STR},
#endif /* HAVE_MCAST_IPV4 */

#if defined HAVE_MCAST_IPV4 || defined HAVE_IGMP_SNOOP
   /* IGMP */
   {MTYPE_IGMP_INST,              APN_PROTO_MAX,    IGMP_INST_STR},
   {MTYPE_IGMP_SVC_REG,           APN_PROTO_MAX,    IGMP_SVC_REG_STR},
   {MTYPE_IGMP_SSM_MAP_STATIC,    APN_PROTO_MAX,    IGMP_SSM_MAP_STATIC_STR},
   {MTYPE_IGMP_IF,                APN_PROTO_MAX,    IGMP_IF_STR},
   {MTYPE_IGMP_IF_IDX,            APN_PROTO_MAX,    IGMP_IF_IDX_STR},
   {MTYPE_IGMP_GRP_REC,           APN_PROTO_MAX,    IGMP_GRP_REC_STR},
   {MTYPE_IGMP_SRC_REC,           APN_PROTO_MAX,    IGMP_SRC_REC_STR},
   {MTYPE_IGMP_SRC_LIST,          APN_PROTO_MAX,    IGMP_SRC_LIST_STR},
   {MTYPE_IGMP_SNMP_VAR,          APN_PROTO_NSM,    IGMP_SNMP_VAR},
#endif /* HAVE_MCAST_IPV4 || HAVE_IGMP_SNOOP */

#ifdef HAVE_MCAST_IPV6
   {MTYPE_NSM_MCAST6,             APN_PROTO_NSM,    NSM_MCAST6_STR},
   {MTYPE_NSM_MCAST6_MIF,         APN_PROTO_NSM,    NSM_MCAST6_MIF_STR},
   {MTYPE_NSM_MCAST6_MRT,         APN_PROTO_NSM,    NSM_MCAST6_MRT_STR},
   {MTYPE_NSM_MCAST6_MRT_OLIST,   APN_PROTO_NSM,    NSM_MCAST6_MRT_OLIST_STR},
   {MTYPE_NSM_MCAST6_STAT_BLOCK,  APN_PROTO_NSM,    NSM_MCAST6_ST_BLK_STR},
   {MTYPE_NSM_MCAST6_MRT_REG,     APN_PROTO_NSM,    NSM_MCAST6_MRT_REG_STR},
#endif /* HAVE_MCAST_IPV6 */

#if defined HAVE_MCAST_IPV6 || defined HAVE_MLD_SNOOP
   /* MLD */
   {MTYPE_MLD_INST,               APN_PROTO_MAX,    MLD_INST_STR},
   {MTYPE_MLD_SVC_REG,            APN_PROTO_MAX,    MLD_SVC_REG_STR},
   {MTYPE_MLD_SSM_MAP_STATIC,     APN_PROTO_MAX,    MLD_SSM_MAP_STATIC_STR},
   {MTYPE_MLD_IF,                 APN_PROTO_MAX,    MLD_IF_STR},
   {MTYPE_MLD_IF_IDX,             APN_PROTO_MAX,    MLD_IF_IDX_STR},
   {MTYPE_MLD_GRP_REC,            APN_PROTO_MAX,    MLD_GRP_REC_STR},
   {MTYPE_MLD_SRC_REC,            APN_PROTO_MAX,    MLD_SRC_REC_STR},
   {MTYPE_MLD_SRC_LIST,           APN_PROTO_MAX,    MLD_SRC_LIST_STR},
   {MTYPE_MLD_SNMP_VAR,           APN_PROTO_NSM,    MLD_SNMP_VAR},
#endif /* HAVE_MCAST_IPV6 || HAVE_MLD_SNOOP */

   {MTYPE_NSM_MROUTE_CONFIG,      APN_PROTO_NSM,    NSM_MROUTE_CONFIG_STR},
   {MTYPE_NSM_MRIB,               APN_PROTO_NSM,    NSM_MRIB_STR},
   {MTYPE_NSM_MNH_REG,            APN_PROTO_NSM,    NSM_MNH_REG_STR},
   {MTYPE_NSM_MNH_REG_CL,         APN_PROTO_NSM,    NSM_MNH_REG_CL_STR},

  /* OSPF */
   {MTYPE_OSPF_MASTER,               APN_PROTO_OSPF,   OSPF_MASTER_STR},
   {MTYPE_OSPF,                      APN_PROTO_OSPF,   OSPF_STR},
   {MTYPE_OSPF_AREA,                 APN_PROTO_OSPF,   OSPF_AREA_STR},
   {MTYPE_OSPF_IF,                   APN_PROTO_OSPF,   OSPF_IF_STR},
   {MTYPE_OSPF_NEIGHBOR,             APN_PROTO_OSPF,   OSPF_NEIGHBOR_STR},
   {MTYPE_OSPF_VERTEX,               APN_PROTO_OSPF,   OSPF_VERTEX_STR},
   {MTYPE_OSPF_NEXTHOP,              APN_PROTO_OSPF,   OSPF_NEXTHOP_STR},
   {MTYPE_OSPF_ROUTE,                APN_PROTO_OSPF,   OSPF_ROUTE_STR},
   {MTYPE_OSPF_ROUTE_CALC,           APN_PROTO_OSPF,   OSPF_ROUTE_CALC_STR},
   {MTYPE_OSPF_PATH,                 APN_PROTO_OSPF,   OSPF_PATH_STR},
   {MTYPE_OSPF_LSA,                  APN_PROTO_OSPF,   OSPF_LSA_STR},
   {MTYPE_OSPF_LSA_DATA,             APN_PROTO_OSPF,   OSPF_LSA_DATA_STR},
   {MTYPE_OSPF_ROUTER_LSA_MAP,       APN_PROTO_OSPF,   OSPF_ROUTER_LSA_MAP_STR},
   {MTYPE_OSPF_SUMMARY_LSA_MAP,      APN_PROTO_OSPF,   OSPF_SUMMARY_LSA_MAP_STR},
   {MTYPE_OSPF_LSDB,                 APN_PROTO_OSPF,   OSPF_LSDB_STR},
   {MTYPE_OSPF_LS_REQUEST,           APN_PROTO_OSPF,   OSPF_LS_REQUEST_STR},
   {MTYPE_OSPF_PACKET,               APN_PROTO_OSPF,   OSPF_PACKET_STR},
   {MTYPE_OSPF_REDIST_INFO,          APN_PROTO_OSPF,   OSPF_REDIST_INFO_STR},
   {MTYPE_OSPF_REDIST_CONF,          APN_PROTO_OSPF,   OSPF_REDIST_CONF_STR},
   {MTYPE_OSPF_REDIST_MAP,           APN_PROTO_OSPF,   OSPF_REDIST_MAP_STR},
   {MTYPE_OSPF_DISTANCE,             APN_PROTO_OSPF,   OSPF_DISTANCE_STR},
   {MTYPE_OSPF_NETWORK,              APN_PROTO_OSPF,   OSPF_NETWORK_STR},
   {MTYPE_OSPF_VLINK,                APN_PROTO_OSPF,   OSPF_VLINK_STR},
#ifdef HAVE_OSPF_MULTI_AREA
   {MTYPE_OSPF_MULTI_AREA_LINK,      APN_PROTO_OSPF,   OSPF_MULTI_AREA_LINK_STR},
#endif /* HAVE_OSPF_MULTI_AREA */
   {MTYPE_OSPF_IF_PARAMS,            APN_PROTO_OSPF,   OSPF_IF_PARAMS_STR},
   {MTYPE_OSPF_PASSIVE_IF,           APN_PROTO_OSPF,   OSPF_PASSIVE_IF_STR},
   {MTYPE_OSPF_AUTH_KEY,             APN_PROTO_OSPF,   OSPF_AUTH_KEY_STR},
   {MTYPE_OSPF_CRYPT_KEY,            APN_PROTO_OSPF,   OSPF_CRYPT_KEY_STR},
   {MTYPE_OSPF_AREA_RANGE,           APN_PROTO_OSPF,   OSPF_AREA_RANGE_STR},
   {MTYPE_OSPF_SUMMARY,              APN_PROTO_OSPF,   OSPF_SUMMARY_STR},
   {MTYPE_OSPF_NEIGHBOR_STATIC,      APN_PROTO_OSPF,   OSPF_NEIGHBOR_STATIC_STR},
   {MTYPE_OSPF_HOST_ENTRY,           APN_PROTO_OSPF,   OSPF_HOST_ENTRY_STR},
   {MTYPE_OSPF_OPAQUE_MAP,           APN_PROTO_OSPF,   OSPF_OPAQUE_MAP_STR},
   {MTYPE_OSPF_OPAQUE_SHOW,          APN_PROTO_OSPF,   OSPF_OPAQUE_SHOW_STR},
   {MTYPE_OSPF_NOTIFIER,             APN_PROTO_OSPF,   OSPF_NOTIFIER_STR},
   {MTYPE_OSPF_VRF,                  APN_PROTO_OSPF,   OSPF_VRF_STR},
   {MTYPE_OSPF_DESC,                 APN_PROTO_OSPF,   OSPF_DESC_STR},
   {MTYPE_OSPF_IGP_SHORTCUT_LSP,     APN_PROTO_OSPF,   OSPF_IGP_SHORTCUT_LSP_STR},
   {MTYPE_OSPF_IGP_SHORTCUT_ROUTE,   APN_PROTO_OSPF,   OSPF_IGP_SHORTCUT_ROUTE_STR},
   {MTYPE_OSPF_DOMAIN_ID,            APN_PROTO_OSPF,   OSPF_DOMAIN_ID_STR},
   {MTYPE_OSPF_RTR_ID,               APN_PROTO_OSPF,   OSPF_RTR_ID_STR},
#ifdef HAVE_GMPLS
   {MTYPE_OSPF_TELINK,               APN_PROTO_OSPF,   OSPF_TEL_STR},
   {MTYPE_OSPF_TLINK_PARAMS,         APN_PROTO_OSPF,   OSPF_TLINK_PARAMS_STR},
   {MTYPE_OSPF_SRLG,                 APN_PROTO_OSPF,   OSPF_SRLG_STR},
#endif /* HAVE_GMPLS */

  /* OSPFv3 */
   {MTYPE_OSPF6_MASTER,              APN_PROTO_OSPF6,  OSPF6_MASTER_STR},
   {MTYPE_OSPF6,                     APN_PROTO_OSPF6,  OSPF6_STR},
   {MTYPE_OSPF6_AREA,                APN_PROTO_OSPF6,  OSPF6_AREA_STR},
   {MTYPE_OSPF6_IF,                  APN_PROTO_OSPF6,  OSPF6_IF_STR},
   {MTYPE_OSPF6_VLINK,               APN_PROTO_OSPF6,  OSPF6_VLINK_STR},
   {MTYPE_OSPF6_NEIGHBOR,            APN_PROTO_OSPF6,  OSPF6_NEIGHBOR_STR},
   {MTYPE_OSPF6_NBR_STATIC,          APN_PROTO_OSPF6,  OSPF6_NBR_STATIC_STR},
   {MTYPE_OSPF6_VERTEX,              APN_PROTO_OSPF6,  OSPF6_VERTEX_STR},
   {MTYPE_OSPF6_ROUTE,               APN_PROTO_OSPF6,  OSPF6_ROUTE_STR},
   {MTYPE_OSPF6_ROUTE_CALC,          APN_PROTO_OSPF6,  OSPF6_ROUTE_CALC_STR},
   {MTYPE_OSPF6_PATH,                APN_PROTO_OSPF6,  OSPF6_PATH_STR},
   {MTYPE_OSPF6_NEXTHOP,             APN_PROTO_OSPF6,  OSPF6_NEXTHOP_STR},
   {MTYPE_OSPF6_LSA,                 APN_PROTO_OSPF6,  OSPF6_LSA_STR},
   {MTYPE_OSPF6_LSA_DATA,            APN_PROTO_OSPF6,  OSPF6_LSA_DATA_STR},
   {MTYPE_OSPF6_LSA_MAP,             APN_PROTO_OSPF6,  OSPF6_LSA_MAP_STR},
   {MTYPE_OSPF6_LSDB,                APN_PROTO_OSPF6,  OSPF6_LSDB_STR},
   {MTYPE_OSPF6_LSDB_SLOT,           APN_PROTO_OSPF6,  OSPF6_LSDB_SLOT_STR},
   {MTYPE_OSPF6_PREFIX,              APN_PROTO_OSPF6,  OSPF6_PREFIX_STR},
   {MTYPE_OSPF6_PREFIX_MAP,          APN_PROTO_OSPF6,  OSPF6_PREFIX_MAP_STR},
   {MTYPE_OSPF6_PACKET,              APN_PROTO_OSPF6,  OSPF6_PACKET_STR},
   {MTYPE_OSPF6_FIFO,                APN_PROTO_OSPF6,  OSPF6_FIFO_STR},
   {MTYPE_OSPF6_REDIST_INFO,         APN_PROTO_OSPF6,  OSPF6_REDIST_INFO_STR},
   {MTYPE_OSPF6_REDIST_CONF,         APN_PROTO_OSPF6,  OSPF6_REDIST_CONF_STR},
   {MTYPE_OSPF6_REDIST_MAP,          APN_PROTO_OSPF6,  OSPF6_REDIST_MAP_STR},
   {MTYPE_OSPF6_IF_PARAMS,           APN_PROTO_OSPF6,  OSPF6_IF_PARAMS_STR},
   {MTYPE_OSPF6_AREA_RANGE,          APN_PROTO_OSPF6,  OSPF6_AREA_RANGE_STR},
   {MTYPE_OSPF6_RMAP_COMPILED,       APN_PROTO_OSPF6,  OSPF6_RMAP_COMPILED_STR},
   {MTYPE_OSPF6_DESC,                APN_PROTO_OSPF6,  OSPF6_DESC_STR},
   {MTYPE_OSPF6_VRF,                 APN_PROTO_OSPF6,  OSPF6_VRF_STR},
   {MTYPE_OSPF6_RTR_ID,              APN_PROTO_OSPF6,  OSPF6_ROUTER_ID_STR},

  /* VRRP */
   {MTYPE_VRRP_GLOBAL_INFO,          APN_PROTO_UNSPEC, VRRP_GLOBAL_INFO_STR},
   {MTYPE_VRRP_SESSION,              APN_PROTO_UNSPEC, VRRP_SESSION_STR},
   {MTYPE_VRRP_ASSO_TABLE,           APN_PROTO_UNSPEC, VRRP_ASSO_TABLE_STR},
   {MTYPE_VRRP_VIP_ADDR,             APN_PROTO_UNSPEC, VRRP_VIP_ADDR_STR},
   {MTYPE_VRRP_IF_AUTH,              APN_PROTO_UNSPEC, VRRP_IF_AUTH_STR},
   {MTYPE_VRRP_LINUX_DATA,           APN_PROTO_UNSPEC, VRRP_LINUX_DATA_STR},
   {MTYPE_VRRP_BSD_DATA,             APN_PROTO_UNSPEC, VRRP_BSD_DATA_STR},
   {MTYPE_VRRP_ASSO,                 APN_PROTO_UNSPEC, VRRP_ASSO_STR},

  /* VTYSH */
   {MTYPE_VTYSH_INTEGRATE,           APN_PROTO_UNSPEC, VTYSH_INTEGRATE_STR},
   {MTYPE_VTYSH_CONFIG,              APN_PROTO_UNSPEC, VTYSH_CONFIG_STR},
   {MTYPE_VTYSH_CONFIG_LINE,         APN_PROTO_UNSPEC, VTYSH_CONFIG_LINE_STR},

  /* LDP */
   {MTYPE_LDP,                       APN_PROTO_LDP,    LDP_STR},
   {MTYPE_LDP_IF,                    APN_PROTO_LDP,    LDP_IF_STR},
   {MTYPE_LDP_ADJACENCY,             APN_PROTO_LDP,    LDP_ADJACENCY_STR},
   {MTYPE_LDP_ENTITY,                APN_PROTO_LDP,    LDP_ENTITY_STR},
   {MTYPE_LDP_SESSION,               APN_PROTO_LDP,    LDP_SESSION_STR},
   {MTYPE_LDP_FEC,                   APN_PROTO_LDP,    LDP_FEC_STR},
   {MTYPE_LDP_FEC_ELEMENT,           APN_PROTO_LDP,    LDP_FEC_ELEMENT_STR},
   {MTYPE_LDP_LABEL,                 APN_PROTO_LDP,    LDP_LABEL_STR},
   {MTYPE_LDP_LABEL_REQUEST,         APN_PROTO_LDP,    LDP_LABEL_REQUEST_STR},
   {MTYPE_LDP_ATTR_NODE,             APN_PROTO_LDP,    LDP_ATTR_NODE_STR},
   {MTYPE_LDP_REMOTE_ADDR,           APN_PROTO_LDP,    LDP_REMOTE_ADDR_STR},
   {MTYPE_LDP_UPSTREAM,              APN_PROTO_LDP,    LDP_UPSTREAM_STR},
   {MTYPE_LDP_DOWNSTREAM,            APN_PROTO_LDP,    LDP_DOWNSTREAM_STR},
   {MTYPE_LDP_USM_PARAM,             APN_PROTO_LDP,    LDP_USM_PARAM_STR},
   {MTYPE_LDP_DSM_PARAM,             APN_PROTO_LDP,    LDP_DSM_PARAM_STR},
   {MTYPE_LDP_IPV4_NEXT_HOP,         APN_PROTO_LDP,    LDP_IPV4_NEXT_HOP_STR},
   {MTYPE_LDP_TMP,                   APN_PROTO_LDP,    LDP_TMP_STR},
   {MTYPE_LDP_PATH_VECTOR,           APN_PROTO_LDP,    LDP_PATH_VECTOR_STR},
   {MTYPE_LDP_ATTR,                  APN_PROTO_LDP,    LDP_ATTR_STR},
   {MTYPE_LDP_CR_ATTR,               APN_PROTO_LDP,    LDP_CR_ATTR_STR},
   {MTYPE_LDP_TLV_ER_HOP,            APN_PROTO_LDP,    LDP_TLV_ER_HOP_STR},
   {MTYPE_LDP_ER,                    APN_PROTO_LDP,    LDP_ER_STR},
   {MTYPE_LDP_ER_HOP,                APN_PROTO_LDP,    LDP_ER_HOP_STR},
   {MTYPE_LDP_PATH,                  APN_PROTO_LDP,    LDP_PATH_STR},
   {MTYPE_LDP_TRUNK,                 APN_PROTO_LDP,    LDP_TRUNK_STR},
#ifdef HAVE_IPV6
   {MTYPE_LDP_IPV6_NEXT_HOP,         APN_PROTO_LDP,    LDP_IPV6_NEXT_HOP_STR},
#endif /* HAVE_IPV6 */

#ifdef HAVE_TE
   {MTYPE_LDP_TRUNK_ADMIN_GROUP,     APN_PROTO_LDP,    LDP_TRUNK_ADMIN_GROUP_STR},
#endif

   {MTYPE_LDP_TARGETED_PEER,         APN_PROTO_LDP,    LDP_TARGETED_PEER_STR},
   {MTYPE_LDP_LS_TO_ADDR,            APN_PROTO_LDP,    LDP_LS_TO_ADDR_STR},

#ifdef HAVE_MPLS_VC
   {MTYPE_LDP_VC,                    APN_PROTO_LDP,    LDP_VC_STR},
   {MTYPE_VC_LSP_CB,                 APN_PROTO_LDP,    VC_LSP_CB_STR},
   {MTYPE_SESSION_VC_LINK,           APN_PROTO_LDP,    SESSION_VC_LINK_STR},
   {MTYPE_VC_EVENT_PARAM,            APN_PROTO_LDP,    VC_EVENT_PARAM_STR},
   {MTYPE_VC_EVENT_PARAM_DATA,       APN_PROTO_LDP,    VC_EVENT_PARAM_DATA_STR},
#endif

#ifdef HAVE_VPLS
   {MTYPE_LDP_VPLS,                  APN_PROTO_LDP,    LDP_VPLS_STR},
#endif
   {MTYPE_LDP_ADV_LIST,              APN_PROTO_LDP,    LDP_ADV_LIST_STR},
   {MTYPE_LDP_ADV_LIST_STR,          APN_PROTO_LDP,    LDP_ADV_LIST_STR_STR},
#ifdef HAVE_LINUX_TCP_MD5_H
   {MTYPE_LDP_NBR_TO_PASSWD,         APN_PROTO_LDP,    LDP_NBR_TO_PASSWD_STR},
#endif /* HAVE_LINUX_TCP_MD5_H */
#ifdef HAVE_RESTART
   {MTYPE_LDP_FEC_STALE_INFO,        APN_PROTO_LDP,    LDP_FEC_STALE_INFO_STR},
#endif /* HAVE_RESTART */

  /* RSVP */
   {MTYPE_RSVP,                      APN_PROTO_RSVP,   RSVP_STR},
   {MTYPE_RSVP_IF,                   APN_PROTO_RSVP,   RSVP_IF_STR},
   {MTYPE_RSVP_WRITE_QUEUE_NODE,     APN_PROTO_RSVP,   RSVP_WRITE_QUEUE_NODE_STR},
   {MTYPE_RSVP_TRUNK,                APN_PROTO_RSVP,   RSVP_TRUNK_STR},
   {MTYPE_RSVP_PATH,                 APN_PROTO_RSVP,   RSVP_PATH_STR},
   {MTYPE_RSVP_PATH_HOP,             APN_PROTO_RSVP,   RSVP_PATH_HOP_STR},
   {MTYPE_RSVP_SESSION,              APN_PROTO_RSVP,   RSVP_SESSION_STR},
   {MTYPE_RSVP_EXPLICIT_ROUTE_VAL,   APN_PROTO_RSVP,   RSVP_EXPLICIT_ROUTE_VAL_STR},
   {MTYPE_RSVP_ROUTE_RECORD_VAL,     APN_PROTO_RSVP,   RSVP_ROUTE_RECORD_VAL_STR},
   {MTYPE_RSVP_NEIGHBOR,             APN_PROTO_RSVP,   RSVP_NEIGHBOR_STR},
   {MTYPE_RSVP_LABEL,                APN_PROTO_RSVP,   RSVP_LABEL_STR},
   {MTYPE_RSVP_SESSION_ADMIN_GROUP,  APN_PROTO_RSVP,   RSVP_SESSION_ADMIN_GROUP_STR},
   {MTYPE_RSVP_RCVD_PKT_NODE,        APN_PROTO_RSVP,   RSVP_RCVD_PKT_NODE_STR},
   {MTYPE_RSVP_NEXTHOP,              APN_PROTO_RSVP,   RSVP_NEXTHOP_STR},
   {MTYPE_RSVP_MAPPED_ROUTE,         APN_PROTO_RSVP,   RSVP_MAPPED_ROUTE_STR},
   {MTYPE_RSVP_PATH_REFRESH_BUF,     APN_PROTO_RSVP,   RSVP_PATH_REFRESH_BUF_STR},
   {MTYPE_RSVP_RESV_REFRESH_BUF,     APN_PROTO_RSVP,   RSVP_RESV_REFRESH_BUF_STR},
   {MTYPE_RSVP_MESSAGE,              APN_PROTO_RSVP,   RSVP_MESSAGE_STR},
   {MTYPE_RSVP_ACK_WAIT_NODE,        APN_PROTO_RSVP,   RSVP_ACK_WAIT_NODE_STR},
   {MTYPE_RSVP_NEIGH_ACK_BUF,        APN_PROTO_RSVP,   RSVP_NEIGH_ACK_BUF_STR},
   {MTYPE_RSVP_NEIGH_BUNDLE_BUF,     APN_PROTO_RSVP,   RSVP_NEIGH_BUNDLE_BUF_STR},
#ifdef HAVE_MPLS_FRR
   {MTYPE_RSVP_SUBOBJ_AVOID_NODE,    APN_PROTO_RSVP,   RSVP_SUBOBJ_AVOID_NODE_STR},
   {MTYPE_RSVP_BYPASS,               APN_PROTO_RSVP,   RSVP_BYPASS_STR},
#endif /* HAVE_MPLS_FRR */

#ifdef HAVE_GMPLS
   {MTYPE_GMPLS_RSVP_IF,                 APN_PROTO_RSVP, GMPLS_RSVP_IF_STR},
   {MTYPE_RSVP_GMPLS_ATTR,               APN_PROTO_RSVP, RSVP_GMPLS_ATTR_STR},
   {MTYPE_RSVP_SESS_GMPLS_ATTR,          APN_PROTO_RSVP, RSVP_GMPLS_SESS_ATTR_STR},
   {MTYPE_RSVP_GMPLS_LABEL_SET,          APN_PROTO_RSVP, RSVP_GMPLS_LBL_SET_STR},
   {MTYPE_RSVP_GMPLS_NOTIFN_TARGET,      APN_PROTO_RSVP, RSVP_GMPLS_NOTIFN_T_STR},
   {MTYPE_RSVP_GMPLS_NOTIFN_AGGREG_BUF,  APN_PROTO_RSVP, RSVP_GMPLS_NOTIFN_AB_STR},
   {MTYPE_RSVP_GMPLS_NOTIFN_AGGREG_NODE, APN_PROTO_RSVP, RSVP_GMPLS_NOTIFN_AN_STR},
   {MTYPE_RSVP_GMPLS_NOTIFN_RESEND_BUF,  APN_PROTO_RSVP, RSVP_GMPLS_NOTIFN_RB_STR},
   {MTYPE_RSVP_GMPLS_NOTIFN_RESEND_NODE, APN_PROTO_RSVP, RSVP_GMPLS_NOTIFN_RN_STR},
   {MTYPE_RSVP_GMPLS_NOTIFN_TARGET_ENTRY, APN_PROTO_RSVP, RSVP_GMPLS_NOTIFN_TGT_STR},
   {MTYPE_RSVP_GMPLS_REMOTE_ACK_BUF,     APN_PROTO_RSVP, RSVP_GMPLS_REM_ACK_STR},
#ifdef HAVE_PCE
   {MTYPE_RSVP_PCE_ATTR,             APN_PROTO_RSVP,  RSVP_PCE_ATTR_STR}, 
#endif /* HAVE_PCE */
#endif /* HAVE_GMPLS */
   /*Resource Table Entry for SNMP */
   {MTYPE_SNMP_RSVP_RESOURCE_ENTRY,  APN_PROTO_RSVP,   RSVP_SNMP_RESOURCE_ENTRY_STR},

   /*Hop Table Entry for SNMP */
   {MTYPE_SNMP_RSVP_HOP_ENTRY,         APN_PROTO_RSVP,   RSVP_SNMP_HOP_ENTRY_STR},

   /*Tunnel Table Entry For SNMP */
   {MTYPE_SNMP_RSVP_TUNNEL_ENTRY,     APN_PROTO_RSVP,   RSVP_SNMP_TUNNEL_ENTRY_STR},

   /* CSPF */
   {MTYPE_CSPF,                      APN_PROTO_OSPF,   CSPF_STR},
   {MTYPE_CSPF_LSP,                  APN_PROTO_OSPF,   CSPF_LSP_STR},
   {MTYPE_CSPF_LSP_ADDR_BINDING,     APN_PROTO_OSPF,   CSPF_LSP_ADDR_BINDING_STR},
   {MTYPE_CSPF_ROUTE_CONSTRAINT,     APN_PROTO_OSPF,   CSPF_ROUTE_CONSTRAINT_STR},
   {MTYPE_CSPF_VERTEX,               APN_PROTO_OSPF,   CSPF_VERTEX_STR},
   {MTYPE_CSPF_PATH_ELEMENT,         APN_PROTO_OSPF,   CSPF_PATH_ELEMENT_STR},
   {MTYPE_CSPF_DATA,                 APN_PROTO_OSPF,   CSPF_DATA_STR},
   {MTYPE_CSPF_SESSION,              APN_PROTO_OSPF,   CSPF_SESSION_STR},
   {MTYPE_CSPF_MSG_BUF,              APN_PROTO_OSPF,   CSPF_MSG_BUF_STR},
   {MTYPE_CSPF_NEXTHOP_DATA,         APN_PROTO_OSPF,   CSPF_NEXTHOP_DATA_STR},
   {MTYPE_CSPF_UNNUMBERED_IF_DATA,   APN_PROTO_OSPF,   CSPF_UNNUMBERED_IF_DATA_STR},
   {MTYPE_CSPF_LSP_LIST,             APN_PROTO_OSPF,   CSPF_LSP_LIST_STR},
   {MTYPE_TE_LSA_NODE,               APN_PROTO_OSPF,   TE_LSA_NODE_STR},
   {MTYPE_OSPF_TE_LSA_DATA,          APN_PROTO_OSPF,   TE_LSA_NODE_STR},
   {MTYPE_CSPF_CLIENT,               APN_PROTO_OSPF,   CSPF_CLIENT_STR},
   {MTYPE_CSPF_LSP_KEY,              APN_PROTO_OSPF,   CSPF_LSP_KEY_STR},
   {MTYPE_CSPF_IPADDR_LIST_ELEMENT,  APN_PROTO_OSPF,   CSPF_IPADDR_LIST_STR},
   {MTYPE_CSPF_SRLG_DATA,            APN_PROTO_OSPF,   CSPF_SRLG_DATA_STR},

   /* IS-IS */
   {MTYPE_ISIS_MASTER,               APN_PROTO_ISIS,   ISIS_MASTER_STR},
   {MTYPE_ISIS_INSTANCE,             APN_PROTO_ISIS,   ISIS_INSTANCE_STR},
   {MTYPE_ISIS_AREA_ADDR,            APN_PROTO_ISIS,   ISIS_AREA_ADDR_STR},
   {MTYPE_ISIS_RECV_AREA_ADDR,       APN_PROTO_ISIS,   ISIS_RECV_AREA_ADDR_STR},
   {MTYPE_ISIS_IF,                   APN_PROTO_ISIS,   ISIS_IF_STR},
   {MTYPE_ISIS_IF_NAME,              APN_PROTO_ISIS,   ISIS_IF_NAME_STR},
   {MTYPE_ISIS_IF_PARAMS,            APN_PROTO_ISIS,   ISIS_IF_PARAMS_STR},
   {MTYPE_ISIS_NEIGHBOR,             APN_PROTO_ISIS,   ISIS_NEIGHBOR_STR},
   {MTYPE_ISIS_TLV,                  APN_PROTO_ISIS,   ISIS_TLV_STR},
   {MTYPE_ISIS_TLV_DATA,             APN_PROTO_ISIS,   ISIS_TLV_DATA_STR},
   {MTYPE_ISIS_STLV,                 APN_PROTO_ISIS,   ISIS_STLV_STR},
   {MTYPE_ISIS_STLV_DATA,            APN_PROTO_ISIS,   ISIS_STLV_DATA_STR},
   {MTYPE_ISIS_LSP,                  APN_PROTO_ISIS,   ISIS_LSP_STR},
   {MTYPE_ISIS_LSP_HEADER,           APN_PROTO_ISIS,   ISIS_LSP_HEADER_STR},
   {MTYPE_ISIS_PACKET,               APN_PROTO_ISIS,   ISIS_PACKET_STR},
   {MTYPE_ISIS_FIFO,                 APN_PROTO_ISIS,   ISIS_FIFO_STR},
   {MTYPE_ISIS_IP_IFADDR,            APN_PROTO_ISIS,   ISIS_IP_IFADDR_STR},
   {MTYPE_ISIS_BITMAP,               APN_PROTO_ISIS,   ISIS_BITMAP_STR},
   {MTYPE_ISIS_BITMAP_BITS,          APN_PROTO_ISIS,   ISIS_BITMAP_BITS_STR},
   {MTYPE_ISIS_VERTEX,               APN_PROTO_ISIS,   ISIS_VERTEX_STR},
   {MTYPE_ISIS_VERTEX_NEXTHOP,       APN_PROTO_ISIS,   ISIS_VERTEX_NEXTHOP_STR},
   {MTYPE_ISIS_ROUTE,                APN_PROTO_ISIS,   ISIS_ROUTE_STR},
   {MTYPE_ISIS_PATH,                 APN_PROTO_ISIS,   ISIS_PATH_STR},
   {MTYPE_ISIS_NEXTHOP,              APN_PROTO_ISIS,   ISIS_NEXTHOP_STR},
   {MTYPE_ISIS_PASSWD,               APN_PROTO_ISIS,   ISIS_PASSWD_STR},
   {MTYPE_ISIS_TAG,                  APN_PROTO_ISIS,   ISIS_TAG_STR},
   {MTYPE_ISIS_HOSTNAME,             APN_PROTO_ISIS,   ISIS_HOSTNAME_STR},
   {MTYPE_ISIS_REDIST_INFO,          APN_PROTO_ISIS,   ISIS_REDIST_INFO_STR},
   {MTYPE_ISIS_REDIST_MAP,           APN_PROTO_ISIS,   ISIS_REDIST_MAP_STR},
   {MTYPE_ISIS_REACH_INFO,           APN_PROTO_ISIS,   ISIS_REACH_INFO_STR},
   {MTYPE_ISIS_REACH_MAP,            APN_PROTO_ISIS,   ISIS_REACH_MAP_STR},
   {MTYPE_ISIS_REACH_SOURCE,         APN_PROTO_ISIS,   ISIS_REACH_SOURCE_STR},
   {MTYPE_ISIS_IS_REACH_MAP,         APN_PROTO_ISIS,   ISIS_IS_REACH_MAP_STR},
   {MTYPE_ISIS_IS_REACH_INFO,        APN_PROTO_ISIS,   ISIS_IS_REACH_INFO_STR},
   {MTYPE_ISIS_SUMMARY,              APN_PROTO_ISIS,   ISIS_SUMMARY_STR},
   {MTYPE_ISIS_RESTART_IF,           APN_PROTO_ISIS,   ISIS_RESTART_IF_STR},
   {MTYPE_ISIS_DESC,                 APN_PROTO_ISIS,   ISIS_DESC_STR},
   {MTYPE_ISIS_DISTANCE,             APN_PROTO_ISIS,   ISIS_DISTANCE_STR},

#ifdef HAVE_MD5
   {MTYPE_ISIS_KEY_CHAIN,            APN_PROTO_ISIS,   ISIS_KEY_CHAIN_STR},
#endif /* HAVE_MD5 */

   /* CSPF for IS-IS */
   {MTYPE_ISIS_CSPF,                 APN_PROTO_ISIS,   ISIS_CSPF_STR},
   {MTYPE_ISIS_CSPF_LSP,             APN_PROTO_ISIS,   ISIS_CSPF_LSP_STR},
   {MTYPE_ISIS_CSPF_ROUTE_CONSTRAINT,APN_PROTO_ISIS,   ISIS_CSPF_ROUTE_CONSTRAINT_STR},
   {MTYPE_ISIS_CSPF_VERTEX,          APN_PROTO_ISIS,   ISIS_CSPF_VERTEX_STR},
   {MTYPE_ISIS_CSPF_VERTEX_NEXTHOP,  APN_PROTO_ISIS,   ISIS_CSPF_VERTEX_NEXTHOP_STR},

   /* PIM-DM */
   {MTYPE_PDM_GLOBAL,                APN_PROTO_PIMDM,  PDM_GLOBAL_STR},
   {MTYPE_PDM_VR,                    APN_PROTO_PIMDM,  PDM_VR_STR},
   {MTYPE_PDM_VRF,                   APN_PROTO_PIMDM,  PDM_VRF_STR},
   {MTYPE_PDM_NBR,                   APN_PROTO_PIMDM,  PDM_NBR_STR},
   {MTYPE_PDM_VIF,                   APN_PROTO_PIMDM,  PDM_VIF_STR},
   {MTYPE_PDM_VIF_LIST,              APN_PROTO_PIMDM,  PDM_VIF_LIST_STR},
   {MTYPE_PDM_VIF_LMEM,              APN_PROTO_PIMDM,  PDM_VIF_LMEM_STR},
   {MTYPE_PDM_AF_VIF,                APN_PROTO_PIMDM,  PDM_AF_VIF_STR},
   {MTYPE_PDM_MRT,                   APN_PROTO_PIMDM,  PDM_MRT_STR},
   {MTYPE_PDM_MRT_VIF,               APN_PROTO_PIMDM,  PDM_MRT_VIF_STR},
   {MTYPE_PDM_NHOP,                  APN_PROTO_PIMDM,  PDM_NHOP_STR},
   {MTYPE_PDM_MSG_RECORD,            APN_PROTO_PIMDM,  PDM_MSG_RECORD_STR},

   /* PIM-SM */
   {MTYPE_PIM,                       APN_PROTO_PIMSM,  PIM_STR},
   {MTYPE_PIM_VIF,                   APN_PROTO_PIMSM,  PIM_VIF_STR},
   {MTYPE_PIM_NEIGHBOR,              APN_PROTO_PIMSM,  PIM_NEIGHBOR_STR},
   {MTYPE_PIM_MIB_NEIGHBOR,          APN_PROTO_PIMSM,  PIM_MIB_NEIGHBOR_STR},
   {MTYPE_PIM_SG,                    APN_PROTO_PIMSM,  PIM_SG_STR},
   {MTYPE_PIM_G,                     APN_PROTO_PIMSM,  PIM_G_STR},
   {MTYPE_PIM_SRC,                   APN_PROTO_PIMSM,  PIM_SRC_STR},
   {MTYPE_PIM_GROUP,                 APN_PROTO_PIMSM,  PIM_GROUP_STR},
   {MTYPE_PIM_MRT,                   APN_PROTO_PIMSM,  PIM_MRT_STR},
   {MTYPE_PIM_STATUS,                APN_PROTO_PIMSM,  PIM_STATUS_STR},
   {MTYPE_PIM_RP,                    APN_PROTO_PIMSM,  PIM_RP_STR},
   {MTYPE_PIM_BSR,                   APN_PROTO_PIMSM,  PIM_BSR_STR},
   {MTYPE_PIM_RP_SET,                APN_PROTO_PIMSM,  PIM_RP_SET_STR},
   {MTYPE_PIM_NEXTHOP,               APN_PROTO_PIMSM,  PIM_NEXTHOP_STR},
   {MTYPE_PIM_OIF,                   APN_PROTO_PIMSM,  PIM_OIF_STR},
   {MTYPE_PIM_RP_XX,                 APN_PROTO_PIMSM,  PIM_RP_XX_STR},
   {MTYPE_PIM_REG,                   APN_PROTO_PIMSM,  PIM_REG_STR},
   {MTYPE_PIM_XG_S_FCR,              APN_PROTO_PIMSM,  PIM_XG_S_FCR_STR},
   {MTYPE_PIM_HELLO_ADDR,            APN_PROTO_PIMSM,  PIM_HELLO_ADDR_STR},
   {MTYPE_PIM_ST_RP_CONF,            APN_PROTO_PIMSM,  PIM_ST_RP_CONF_STR},
   {MTYPE_PIM_CRP,                   APN_PROTO_PIMSM,  PIM_CRP_STR},
   {MTYPE_PIM_CRP_GRP_RNG,           APN_PROTO_PIMSM,  PIM_CRP_GRP_RNG_STR},
   {MTYPE_PIM_VIF_LOCAL_INFO,        APN_PROTO_PIMSM,  PIM_VIF_LOCAL_INFO_STR},
   {MTYPE_PIM_ANYCAST_RP,            APN_PROTO_PIMSM,  PIM_ANYCAST_RP_STR},
   {MTYPE_PIM_ANYCAST_RP_MEM,        APN_PROTO_PIMSM,  PIM_ANYCAST_RP_MEM_STR},

   /* PIM-SM6 */
   {MTYPE_PIM6,                      APN_PROTO_PIMSM6, PIM6_STR},
   {MTYPE_PIM6_VIF,                  APN_PROTO_PIMSM6, PIM6_VIF_STR},
   {MTYPE_PIM6_NEIGHBOR,             APN_PROTO_PIMSM6, PIM6_NEIGHBOR_STR},
   {MTYPE_PIM6_MIB_NEIGHBOR,         APN_PROTO_PIMSM6, PIM6_MIB_NEIGHBOR_STR},
   {MTYPE_PIM6_SG,                   APN_PROTO_PIMSM6, PIM6_SG_STR},
   {MTYPE_PIM6_G,                    APN_PROTO_PIMSM6, PIM6_G_STR},
   {MTYPE_PIM6_SRC,                  APN_PROTO_PIMSM6, PIM6_SRC_STR},
   {MTYPE_PIM6_GROUP,                APN_PROTO_PIMSM6, PIM6_GROUP_STR},
   {MTYPE_PIM6_MRT,                  APN_PROTO_PIMSM6, PIM6_MRT_STR},
   {MTYPE_PIM6_STATUS,               APN_PROTO_PIMSM6, PIM6_STATUS_STR},
   {MTYPE_PIM6_RP,                   APN_PROTO_PIMSM6, PIM6_RP_STR},
   {MTYPE_PIM6_BSR,                  APN_PROTO_PIMSM6, PIM6_BSR_STR},
   {MTYPE_PIM6_RP_SET,               APN_PROTO_PIMSM6, PIM6_RP_SET_STR},
   {MTYPE_PIM6_NEXTHOP,              APN_PROTO_PIMSM6, PIM6_NEXTHOP_STR},
   {MTYPE_PIM6_OIF,                  APN_PROTO_PIMSM6, PIM6_OIF_STR},
   {MTYPE_PIM6_RP_XX,                APN_PROTO_PIMSM6, PIM6_RP_XX_STR},
   {MTYPE_PIM6_REG,                  APN_PROTO_PIMSM6, PIM6_REG_STR},
   {MTYPE_PIM6_XG_S_FCR,             APN_PROTO_PIMSM6, PIM6_XG_S_FCR_STR},
   {MTYPE_PIM6_HELLO_ADDR,           APN_PROTO_PIMSM6, PIM6_HELLO_ADDR_STR},
   {MTYPE_PIM6_ST_RP_CONF,           APN_PROTO_PIMSM6, PIM6_ST_RP_CONF_STR},
   {MTYPE_PIM6_CRP,                  APN_PROTO_PIMSM6, PIM6_CRP_STR},
   {MTYPE_PIM6_CRP_GRP_RNG,          APN_PROTO_PIMSM6, PIM6_CRP_GRP_RNG_STR},
   {MTYPE_PIM6_VIF_LOCAL_INFO,       APN_PROTO_PIMSM6, PIM6_VIF_LOCAL_INFO_STR},
   {MTYPE_PIM6_ANYCAST_RP,           APN_PROTO_PIMSM6, PIM6_ANYCAST_RP_STR},
   {MTYPE_PIM6_ANYCAST_RP_MEM,       APN_PROTO_PIMSM6, PIM6_ANYCAST_RP_MEM_STR},

   /* DVMRP */
   {MTYPE_DVMRP,                     APN_PROTO_DVMRP,  DVMRP_STR},
   {MTYPE_DVMRP_VIF,                 APN_PROTO_DVMRP,  DVMRP_VIF_STR},
   {MTYPE_DVMRP_BITMAP,              APN_PROTO_DVMRP,  DVMRP_BITMAP_STR},
   {MTYPE_DVMRP_BITMAP_BLOCK,        APN_PROTO_DVMRP,  DVMRP_BITMAP_BLOCK_STR},
   {MTYPE_DVMRP_NBR,                 APN_PROTO_DVMRP,  DVMRP_NBR_STR},
   {MTYPE_DVMRP_PRUNE,               APN_PROTO_DVMRP,  DVMRP_PRUNE_STR},
   {MTYPE_DVMRP_DSPS,                APN_PROTO_DVMRP,  DVMRP_DSPS_STR},
   {MTYPE_DVMRP_DSPS_NBR,            APN_PROTO_DVMRP,  DVMRP_DSPS_NBR_STR},
   {MTYPE_DVMRP_FCR,                 APN_PROTO_DVMRP,  DVMRP_FCR_STR},
   {MTYPE_DVMRP_ROUTE,               APN_PROTO_DVMRP,  DVMRP_ROUTE_STR},
   {MTYPE_DVMRP_ROUTE_DS_STATE,      APN_PROTO_DVMRP,  DVMRP_ROUTE_DS_STATE_STR},
   {MTYPE_DVMRP_TUNNEL_CONF,         APN_PROTO_DVMRP,  DVMRP_TUNNEL_CONF_STR},
   {MTYPE_DVMRP_VIF_LOCAL_INFO,      APN_PROTO_DVMRP,  DVMRP_VIF_LOCAL_INFO_STR},

   /* Layer 2 */
   {MTYPE_NSM_BRIDGE,                APN_PROTO_NSM,    "NSM Bridge"},

#if defined (HAVE_I_BEB) || defined (HAVE_B_BEB)
   {MTYPE_NSM_BRIDGE_PBB,            APN_PROTO_NSM,    "NSM PBB Bridge"},
#endif /*(HAVE_I_BEB) || (HAVE_B_BEB)*/
#ifdef HAVE_I_BEB
   {MTYPE_NSM_BRIDGE_PBB_ICOMP,        APN_PROTO_NSM,    "NSM PBB I-Comp"},
   {MTYPE_NSM_BRIDGE_PBB_CNP_NODE,     APN_PROTO_NSM,    "NSM PBB CNP Node"},
   {MTYPE_NSM_BRIDGE_PBB_VIP_NODE,     APN_PROTO_NSM,    "NSM PBB VIP Node"},
   {MTYPE_NSM_BRIDGE_PBB_PIP_NODE,     APN_PROTO_NSM,    "NSM PBB PIP Node"},
   {MTYPE_NSM_BRIDGE_PBB_SID2VIP_NODE, APN_PROTO_NSM,    "NSM PBB SID2VIP Node"},
   {MTYPE_NSM_BRIDGE_PBB_VIP2PIP_NODE, APN_PROTO_NSM,    "NSM PBB VIP2PIP Node"},
   {MTYPE_NSM_BRIDGE_PBB_SVLAN_BUNDLE, APN_PROTO_NSM,    "NSM PBB SVLAN Boundle"},
#endif /*HAVE_I_BEB  */

#ifdef HAVE_B_BEB
   {MTYPE_NSM_BRIDGE_PBB_BCOMP,        APN_PROTO_NSM,    "NSM PBB B-Comp"},
   {MTYPE_NSM_BRIDGE_PBB_CBP_NODE,     APN_PROTO_NSM,    "NSM PBB CBP node"},
#endif  /*HAVE_B_BEB*/

#ifdef HAVE_PBB_TE
  {MTYPE_NSM_PBB_TE_VID_NODE,          APN_PROTO_NSM,    "PBB-TE te-vlan node"},
  {MTYPE_PBB_TE_VID,                   APN_PROTO_NSM,    "PBB-TE vlan node"},
#if defined HAVE_I_BEB && defined HAVE_B_BEB
  {MTYPE_NSM_PBB_TE_INSTANCE_NODE,     APN_PROTO_NSM,    "PBB-TE instance node"},
  {MTYPE_NSM_PBB_TE_ESP_NODE,          APN_PROTO_NSM,    "PBB-TE esp node"},
  {MTYPE_PBB_TE_EPS_NODE,              APN_PROTO_NSM,    "PBB-TE EPS node"},
  {MTYPE_PBB_TE_ISID,                  APN_PROTO_NSM,    "PBB-TE isid node"},
#if defined (HAVE_GMPLS) && defined (HAVE_GELS)
  {MTYPE_PBB_TE_TESI_NAME_TO_ID_NODE,  APN_PROTO_NSM,    "PBB-TE TESI name to id node"},
  {MTYPE_NSM_PBB_TE_RMAC_NODE,         APN_PROTO_NSM,    "PBB-TE RMAC node"},
#endif /* HAVE_GMPLS && HAVE_GELS */
#endif /* HAVE_I_BEB && HAVE_B_BEB */

#endif /* HAVE_PBB_TE */
#ifdef HAVE_G8031
   {MTYPE_NSM_G8031_VLAN,            APN_PROTO_ONM,    G8031_VLAN_STR},
   {MTYPE_G8031_PROTECTION_GROUP,    APN_PROTO_ONM,    G8031_PROTECTION_GRP_STR},
#endif /* HAVE_G8031*/

#ifdef HAVE_G8032
  {MTYPE_NSM_G8032_VLAN,          APN_PROTO_ONM,    "G8032 NSM VLAN"},
  {MTYPE_NSM_G8032_NODE,          APN_PROTO_ONM,    "G8032 NSM NODE"},
  {MTYPE_G8032_ATTRIB,            APN_PROTO_ONM,    "G8032 ATTRIB"},
  {MTYPE_G8032_SM,                APN_PROTO_ONM,    "G8032 SM "},
  {MTYPE_G8032_NODE,              APN_PROTO_ONM,    "G8032 NODE"},
  {MTYPE_G8032_VLAN,              APN_PROTO_ONM,    "G8032 VLAN"},
#endif /*HAVE_G8032*/

  {MTYPE_NSM_BRIDGE_PORT,         APN_PROTO_NSM,    "NSM Bridge Port"},
  {MTYPE_NSM_BRIDGE_MASTER,       APN_PROTO_NSM,    "NSM Bridge Master"},

   {MTYPE_VLAN,                      APN_PROTO_NSM,    "VLAN"},
   {MTYPE_VLAN_EVC_ID,               APN_PROTO_NSM,    "VLAN EVC-ID"},
   {MTYPE_NSM_BRIDGE_STATIC_FDB,     APN_PROTO_NSM,    "NSM Bridge Static FDB"},
   {MTYPE_NSM_BRIDGE_FDB_IFINFO,     APN_PROTO_NSM,    "NSM Bridge Fdb IF Info"},
   {MTYPE_NSM_BRIDGE_STAT_FDB_CFG,   APN_PROTO_NSM,    "NSM Briddge Static Fdb Config Info"},
   {MTYPE_STP_BRIDGE,                APN_PROTO_STP,    STP_BRIDGE_STR},
   {MTYPE_STP_BRIDGE_PORT,           APN_PROTO_STP,    STP_BRIDGE_PORT_STR},
   {MTYPE_STP_BRIDGE_CONFIG,         APN_PROTO_STP,    "STP Bridge Config"},
   {MTYPE_STP_BRIDGE_CONFIG_FDB_LIST,APN_PROTO_STP,    "STP Bridge FDB list"},
   {MTYPE_RSTP_BRIDGE,               APN_PROTO_RSTP,   RSTP_BRIDGE_STR},
   {MTYPE_RSTP_BRIDGE_PORT,          APN_PROTO_RSTP,   RSTP_BRIDGE_PORT_STR},
   {MTYPE_RSTP_BRIDGE_CONFIG,        APN_PROTO_RSTP,   "RSTP Bridge Config"},
   {MTYPE_RSTP_BRIDGE_CONFIG_FDB_LIST,APN_PROTO_RSTP,  "RSTP Bridge FDB list"},
   {MTYPE_MSTP_VLAN,                 APN_PROTO_MSTP,   MSTP_VLAN_STR},
   {MTYPE_MSTP_BRIDGE,               APN_PROTO_MSTP,   MSTP_BRIDGE_STR},
   {MTYPE_MSTP_BRIDGE_NAME,          APN_PROTO_MSTP,   MSTP_BRIDGE_NAME_STR},
   {MTYPE_MSTP_BRIDGE_INSTANCE,      APN_PROTO_MSTP,   MSTP_BRIDGE_INSTANCE_STR},
   {MTYPE_MSTP_PORT_INSTANCE,        APN_PROTO_MSTP,   MSTP_PORT_INSTANCE_STR},
   {MTYPE_MSTP_BRIDGE_PORT,          APN_PROTO_MSTP,   MSTP_BRIDGE_PORT_STR},
   {MTYPE_MSTP_MSTI_INFO,            APN_PROTO_MSTP,   MSTP_MSTI_INFO_STR},
   {MTYPE_MSTP_BPDU_INST,            APN_PROTO_MSTP,   MSTP_BPDU_INST_STR},
   {MTYPE_MSTP_BRIDGE_CONFIG,        APN_PROTO_MSTP,   "MSTP Bridge Config"},
   {MTYPE_MSTP_BRIDGE_CONFIG_FDB_LIST,APN_PROTO_MSTP,  "MSTP Bridge Config"},
   {MTYPE_MSTP_BRIDGE_CONFIG_INSTANCE_LIST,APN_PROTO_MSTP, "MSTP Bridge Instance Config"},
#if (defined HAVE_I_BEB || defined HAVE_B_BEB )
   {MTYPE_MSTP_BRIDGE_PBB_VIP_NODE,  APN_PROTO_MSTP,   "MSTP PBB VIP node"},
#endif
   {MTYPE_VLAN_MSTP_CONFIG,          APN_PROTO_MSTP,   "MSTP Bridge vlan config"},

   /* ONMD */
   {MTYPE_ONMD_GLOBALS,              APN_PROTO_ONM,  ONMD_GLOBALS_STR},
   {MTYPE_ONMD_MASTER,               APN_PROTO_ONM,  ONMD_MASTER_STR},
   {MTYPE_ONM_INTERFACE,             APN_PROTO_ONM,  ONM_INTERFACE_STR},
   {MTYPE_ONM_CLIENT_HANDLER,        APN_PROTO_ONM,  ONM_CLIENT_HANDLER_STR},
   {MTYPE_ONM_CLIENT,                APN_PROTO_ONM,  ONM_CLIENT_STR},
   {MTYPE_ONM_SERVER_ENTRY,          APN_PROTO_ONM,  ONM_SERVER_ENTRY_STR},
   {MTYPE_ONM_SERVER_CLIENT,         APN_PROTO_ONM,  ONM_SERVER_CLIENT_STR},
   {MTYPE_ONM_SERVER,                APN_PROTO_ONM,  ONM_SERVER_STR},
   {MTYPE_ONM_PENDING_MSG,           APN_PROTO_ONM,  ONM_PENDING_MSG_STR},
   {MTYPE_ONM_MSG_QUEUE,             APN_PROTO_ONM,  ONM_MSG_QUEUE_STR},
   {MTYPE_ONM_MSG_QUEUE_BUF,         APN_PROTO_ONM,  ONM_MSG_QUEUE_BUF_STR},

   /* 802.1x */
   {MTYPE_8021X_GLOBALS,             APN_PROTO_8021X,  AUTH_GLOBALS_STR},
   {MTYPE_8021X_MASTER,              APN_PROTO_8021X,  AUTH_MASTER_STR},
   {MTYPE_8021X_PORT,                APN_PROTO_8021X,  AUTH_PORT_STR},
   {MTYPE_8021X_RADIUS,              APN_PROTO_8021X,  AUTH_RADIUS_STR},

   /*MAC-based authentication Enhancement*/
   {MTYPE_MAC_AUTH_PORT,             APN_PROTO_8021X,  MAC_AUTH_PORT_STR},

#ifdef HAVE_USER_HSL
   {MTYPE_HSL_SERVER_ENTRY,            APN_PROTO_HSL,    "HSL_SERVER_ENTRY"},
   {MTYPE_HSL_BRIDGE,                  APN_PROTO_HSL,    "HSL_BRIDGE"},
#endif /* HAVE_USER_HSL */

#ifdef HAVE_AXELX
   {MTYPE_HSL_AXEL_IF,                 APN_PROTO_HSL,    "HSL_AXEL_IF"},
   {MTYPE_HSL_AXEL_FDB,                APN_PROTO_HSL,    "HSL_AXEL_FDB"},
#endif /* HAVE_AXELX */

#ifdef HAVE_MARVELL_LS
   {MTYPE_HSL_SOHO_MVL_IF,           APN_PROTO_HSL,    "Marvell Link Street Interface"},
   {MTYPE_HSL_SOHO_MVL_FDB,          APN_PROTO_HSL,    "Marvell Link Street FDB"},
#endif /* HAVE_MARVELL_LS */

   {MTYPE_LACP_INSTANCE,             APN_PROTO_LACP,   "LACP Instance"},
   {MTYPE_LACP_AGGREGATOR,           APN_PROTO_LACP,   LACP_AGGREGATOR_STR},
   {MTYPE_LACP_LINK,                 APN_PROTO_LACP,   LACP_LINK_STR},
   {MTYPE_LACP_ADMIN_KEY_ELEMENT, APN_PROTO_LACP,      "LACP Admin Key Element"},
   {MTYPE_GARP_GID,                  APN_PROTO_STP,    GARP_GID_STR},
   {MTYPE_GARP_GID_PORT,             APN_PROTO_STP,    GARP_GID_PORT_STR},
   {MTYPE_GARP_GID_MACHINE,          APN_PROTO_STP,    GARP_GID_MACHINE_STR},
   {MTYPE_GARP_GIP,                  APN_PROTO_STP,    GARP_GIP_STR},
   {MTYPE_NSM_L2_MCAST,              APN_PROTO_NSM,    NSM_L2_MCAST_STR},
   {MTYPE_NSM_L2_MCAST_GRP_REC,      APN_PROTO_NSM,    NSM_L2_MCAST_GRP_STR},
   {MTYPE_NSM_L2_MCAST_SRC_REC,      APN_PROTO_NSM,    NSM_L2_MCAST_SRC_STR},

   {MTYPE_GMRP,                      APN_PROTO_STP,    GMRP_STR},
   {MTYPE_NSM_VLAN_CLASSIFIER_GROUP, APN_PROTO_NSM,    NSM_VLAN_CLASSIFIER_GROUP_STR},
   {MTYPE_NSM_VLAN_CLASSIFIER_RULE,  APN_PROTO_NSM,    NSM_VLAN_CLASSIFIER_RULE_STR},
   {MTYPE_NSM_VLAN_CLASS_IF_GROUP,   APN_PROTO_NSM,    NSM_VLAN_CLASS_IF_GROUP_STR},
   {MTYPE_NSM_VLAN_CLASS_TMP_GROUP,  APN_PROTO_NSM,    NSM_VLAN_CLASS_TMP_GROUP_STR},
   {MTYPE_NSM_VLAN_CLASS_TMP_RULE,   APN_PROTO_NSM,    NSM_VLAN_CLASS_TMP_RULE_STR},
   {MTYPE_NSM_CVLAN_REG_TAB,         APN_PROTO_NSM,    NSM_CVLAN_REG_TAB_STR},
   {MTYPE_NSM_VLAN_DBL_VID_KEY,      APN_PROTO_NSM,    NSM_VLAN_DBL_VID_KEY_STR},
   {MTYPE_NSM_VLAN_PRO_EDGE_SWCTX,   APN_PROTO_NSM,    NSM_VLAN_PRO_EDGE_SWCTX_STR},
   {MTYPE_NSM_VLAN_SVLAN_INFO,       APN_PROTO_NSM,    NSM_VLAN_SVLAN_INFO_STR},
   {MTYPE_NSM_VLAN_SVLAN_PORT_INFO,  APN_PROTO_NSM,    NSM_VLAN_SVLAN_PORT_INFO_STR},
   {MTYPE_NSM_VLAN_BITMAP,           APN_PROTO_NSM,    NSM_VLAN_BITMAP_STR},
   {MTYPE_NSM_UNI_BW_PROFILE,        APN_PROTO_NSM,    NSM_UNI_BW_PROFILE_STR},
   {MTYPE_NSM_INGRESS_UNI_BW_PROFILE,APN_PROTO_NSM,    NSM_INGRESS_UNI_BW_PROFILE_STR},
   {MTYPE_NSM_EGRESS_UNI_BW_PROFILE, APN_PROTO_NSM,    NSM_EGRESS_UNI_BW_PROFILE_STR},
   {MTYPE_NSM_INGRESS_EVC_BW_PROFILE,APN_PROTO_NSM,    NSM_INGRESS_EVC_BW_PROFILE_STR},
   {MTYPE_NSM_EGRESS_EVC_BW_PROFILE, APN_PROTO_NSM,    NSM_EGRESS_EVC_BW_PROFILE_STR},
   {MTYPE_NSM_INGRESS_EVC_COS_BW_PROFILE, APN_PROTO_NSM, NSM_INGRESS_EVC_COS_BW_PROFILE},
   {MTYPE_NSM_EGRESS_EVC_COS_BW_PROFILE, APN_PROTO_NSM, NSM_EGRESS_EVC_COS_BW_PROFILE},
   {MTYPE_NSM_UNI_EVC_BW,            APN_PROTO_NSM,    NSM_UNI_EVC_BW_PROFILE_STR}, 
   {MTYPE_NSM_EFM_OAM_IF,            APN_PROTO_NSM,    NSM_EFM_OAM_IF_STR},
   {MTYPE_NSM_LLDP_IF,               APN_PROTO_NSM,    NSM_EFM_LLDP_IF_STR},
   {MTYPE_NSM_L2_OAM_MASTER,         APN_PROTO_NSM,    NSM_L2_OAM_MASTER_STR},
   {MTYPE_GMRP_VLAN,                 APN_PROTO_STP,    GMRP_VLAN_STR},
   {MTYPE_GMRP_PORT,                 APN_PROTO_STP,    GMRP_PORT_STR},
   {MTYPE_GMRP_PORT_INSTANCE,        APN_PROTO_STP,    GMRP_PORT_INSTANCE_STR},
   {MTYPE_GMRP_PORT_CONFIG,          APN_PROTO_STP,    GMRP_PORT_CONFIG_STR},
   {MTYPE_GMRP_GMD,                  APN_PROTO_STP,    GMRP_GMD_STR},
   {MTYPE_GMRP_GMD_ENTRY,            APN_PROTO_STP,    GMRP_GMD_ENTRY_STR},
   {MTYPE_GMRP_BRIDGE,               APN_PROTO_STP,    "GMRP Bridge Entry"},

   {MTYPE_GVRP,                      APN_PROTO_STP,    GVRP_STR},
   {MTYPE_GVRP_PORT,                 APN_PROTO_STP,    GVRP_PORT_STR},
   {MTYPE_GVRP_PORT_CONFIG,          APN_PROTO_STP,    GVRP_PORT_CONFIG_STR},
   {MTYPE_GVRP_GVD,                  APN_PROTO_STP,    GVRP_GVD_STR},
   {MTYPE_GVRP_GVD_ENTRY,            APN_PROTO_STP,    GVRP_GVD_ENTRY_STR},
   {MTYPE_GVRP_CONFIG_PORTS,         APN_PROTO_STP,    GVRP_CONFIG_PORTS_STR},
   {MTYPE_L2_SNMP_FDB,               APN_PROTO_STP,    L2_SNMP_FDB_STR},
   {MTYPE_FLOW_CONTROL_ENTRY,        APN_PROTO_STP,    FLOW_CONTROL_ENTRY_STR},
   {MTYPE_PORT_MIRROR_ENTRY,         APN_PROTO_STP,    PORT_MIRROR_ENTRY_STR},
   {MTYPE_BCAST_SUPPRESS_ENTRY,      APN_PROTO_STP,    BCAST_SUPPRESS_ENTRY_STR},
   {MTYPE_VLAN_DATABASE,             APN_PROTO_STP,    VLAN_DATABASE_STR},
   {MTYPE_BRIDGE_VLAN_CONFIG, APN_PROTO_STP, "Vlan bridge configuration"},
   {MTYPE_VLAN_CONFIG_ENTRY, APN_PROTO_STP, "Vlan Configuration Entry"},
   {MTYPE_XSTP_INTERFACE,            APN_PROTO_STP,    STP_INTERFACE_STR},
   {MTYPE_PORT_INSTANCE_LIST,        APN_PROTO_MSTP,   "MSTP Port Instance list"},

#ifdef HAVE_IMI
    /* IMI */
   {MTYPE_IMI,                       APN_PROTO_IMI,    IMI_STR},
   {MTYPE_IMI_MASTER,                APN_PROTO_IMI,    IMI_MASTER_STR},
   {MTYPE_IMI_STRING,                APN_PROTO_IMI,    IMI_STRING_STR},
   {MTYPE_IMI_SERVER,                APN_PROTO_IMI,    IMI_SERVER_STR},
   {MTYPE_IMI_SERVER_CLIENT,         APN_PROTO_IMI,    IMI_SERVER_CLIENT_STR},
   {MTYPE_IMI_SERVER_ENTRY,          APN_PROTO_IMI,    IMI_SERVER_ENTRY_STR},
   {MTYPE_IMI_LINE,                  APN_PROTO_IMI,    IMI_LINE_STR},
   {MTYPE_IMI_SERV,                  APN_PROTO_IMI,    IMI_SERV_STR},
   {MTYPE_IMI_EXTAPI,                APN_PROTO_IMI,    IMI_EXTAPI_STR},
   {MTYPE_IMI_WEB,                   APN_PROTO_IMI,    IMI_WEB_STR},
   {MTYPE_IMI_DNS,                   APN_PROTO_IMI,    IMI_DNS_STR},
   {MTYPE_IMI_DHCP,                  APN_PROTO_IMI,    IMI_DHCP_STR},
   {MTYPE_IMI_DHCP_POOL,             APN_PROTO_IMI,    IMI_DHCP_POOL_STR},
   {MTYPE_IMI_DHCP_RANGE,            APN_PROTO_IMI,    IMI_DHCP_RANGE_STR},
   {MTYPE_IMI_DHCP_CLIENT,           APN_PROTO_IMI,    IMI_DHCP_CLIENT_STR},
   {MTYPE_IMI_PPPOE,                 APN_PROTO_IMI,    IMI_PPPOE_STR},
   {MTYPE_IMI_NAT_POOL,              APN_PROTO_IMI,    IMI_NAT_POOL_STR},
   {MTYPE_IMI_RULE,                  APN_PROTO_IMI,    IMI_RULE_STR},
   {MTYPE_IMI_VIRTUAL_SERVER,        APN_PROTO_IMI,    IMI_VIRTUAL_SERVER_STR},
   {MTYPE_IMI_VIRTUAL_SERVER_DESC,   APN_PROTO_IMI,    IMI_VIRTUAL_SERVER_DESC_STR},
   {MTYPE_IMI_NTP_MASTER,            APN_PROTO_IMI,    IMI_NTP_MASTER_STR},
   {MTYPE_IMI_NTP_AUTH_KEY,          APN_PROTO_IMI,    IMI_NTP_AUTH_KEY_STR},
   {MTYPE_IMI_NTP_TRUSTED_KEY,       APN_PROTO_IMI,    IMI_NTP_TRUSTED_KEY_STR},
   {MTYPE_IMI_NTP_NEIGHBOR,          APN_PROTO_IMI,    IMI_NTP_NEIGHBOR_STR},
   {MTYPE_IMI_CONFIG,                APN_PROTO_IMI,    IMI_CONFIG_STR},
   {MTYPE_IMI_STATE,                 APN_PROTO_IMI,    IMI_STATE_STR},
   {MTYPE_IMI_STATE_LINE,            APN_PROTO_IMI,    IMI_STATE_LINE_STR},
#endif /* HAVE_IMI */
   {MTYPE_IMI_CFG_CMD,               APN_PROTO_MAX,    IMI_CFG_CMD_STR},

   /* PAL workspace */
   {MTYPE_CFG_HANDLE,                APN_PROTO_MAX,    CFG_HANDLE_STR},
   {MTYPE_LOG_HANDLE,                APN_PROTO_MAX,    LOG_HANDLE_STR},
   {MTYPE_LOG_NAME,                  APN_PROTO_MAX,    LOG_NAME_STR},
   {MTYPE_SOCK_HANDLE,               APN_PROTO_MAX,    SOCK_HANDLE_STR},

#ifdef HAVE_INTEL
   {MTYPE_L3_NPF_NEXTHOP,            APN_PROTO_NSM,    L3_NPF_NEXTHOP_STR},
   {MTYPE_L3_NPF_NHOP_ARRAY,         APN_PROTO_NSM,    L3_NPF_NHOP_ARRAY_STR},
   {MTYPE_L3_NPF_PREFIX,             APN_PROTO_NSM,    L3_NPF_PREFIX_STR},
#endif /* HAVE_INTEL */

   {MTYPE_HOST,                      APN_PROTO_MAX,    HOST_STR},
   {MTYPE_COMMAND_NODE,              APN_PROTO_MAX,    COMMAND_NODE_STR},
   {MTYPE_DISTRIBUTE,                APN_PROTO_MAX,    DISTRIBUTE_STR},
   {MTYPE_DISTSTR,                   APN_PROTO_MAX,    DISTSTR_STR},
   {MTYPE_ZLOG,                      APN_PROTO_MAX,    ZLOG_STR},
   {MTYPE_IF_DESC,                   APN_PROTO_MAX,    IF_DESC_STR},
   {MTYPE_IF_RMAP,                   APN_PROTO_MAX,    IF_RMAP_STR},
   {MTYPE_IF_RMAP_NAME,              APN_PROTO_UNSPEC, IF_RMAP_NAME_STR},
   {MTYPE_SOCKUNION,                 APN_PROTO_MAX,    SOCKUNION_STR},
   {MTYPE_ZGLOB,                     APN_PROTO_MAX,    ZGLOB_STR},

   /* default if something is wrong with input type */
   {MTYPE_UNKNOWN,                   APN_PROTO_UNSPEC, UNKNOWN_STR},

#ifdef HAVE_CRX
   {MTYPE_CRX_MESSAGE_HANDLER,       APN_PROTO_CRX,    CRX_MESSAGE_HANDLER_STR},
   {MTYPE_CRX_PEER,                  APN_PROTO_CRX,    CRX_PEER_STR},
   {MTYPE_CRX_CONFIG_DATA,           APN_PROTO_CRX,    CRX_CONFIG_DATA_STR},
   {MTYPE_CRX_IF,                    APN_PROTO_CRX,    CRX_IF_STR},
   {MTYPE_CRX_INFO,                  APN_PROTO_CRX,    CRX_INFO_STR},
   {MTYPE_CRX,                       APN_PROTO_CRX,    CRX_STR},
#endif /* HAVE_CRX */

#ifdef HAVE_VRX
   {MTYPE_IF_VRX_INFO,               APN_PROTO_VRX,    VRX_INFO_STR},
#endif /* HAVE_VRX */
   {MTYPE_LDP_ID,                    APN_PROTO_LDP,    LDP_ID_STR},
#ifdef HAVE_RMOND
   {MTYPE_RMON,                      APN_PROTO_RMON,   RMON_INFO_STR},
#endif /* HAVE_RMOND */
#ifdef HAVE_IPSEC
   {MTYPE_IPSEC_CRYPTO_MAP,          APN_PROTO_NSM,    IPSEC_CRYPTO_STR},
   {MTYPE_IPSEC_TRANSFORM_SET,       APN_PROTO_NSM,    IPSEC_TRANSFORM_STR},
   {MTYPE_IPSEC,                     APN_PROTO_NSM,    IPSEC_STR},
   {MTYPE_IPSEC_ISAKMP,              APN_PROTO_NSM,    IPSEC_ISAKMP_STR},
   {MTYPE_IPSEC_SESSION_KEY,         APN_PROTO_NSM,    IPSEC_SESSION_KEY_STR},
   {MTYPE_IPSEC_PEER_ADDR,           APN_PROTO_NSM,    IPSEC_PEER_STR},
   {MTYPE_IPSEC_MASTER,              APN_PROTO_NSM,    IPSEC_MASTER_STR},
   {MTYPE_IPSEC_CRYPTO_BUNDLE,       APN_PROTO_NSM,    IPSEC_CRYPTO_BUNDLE_STR},
#endif /* HAVE_IPSEC */

#ifdef HAVE_FIREWALL
   {MTYPE_FIREWALL_MASTER,           APN_PROTO_NSM,    FIREWALL_MASTER_STR},
   {MTYPE_FIREWALL_GROUP,            APN_PROTO_NSM,    FIREWALL_GROUP_STR},
#endif /* HAVE_FIREWALL */

#ifdef HAVE_HA
   {MTYPE_CAL,                       APN_PROTO_UNSPEC, MTYPE_CAL_STR      },
   {MTYPE_CAL_TXN,                   APN_PROTO_UNSPEC, MTYPE_CAL_TXN_STR  },
   {MTYPE_CAL_ACT,                   APN_PROTO_UNSPEC, MTYPE_CAL_ACT_STR  },
   {MTYPE_CAL_CDR,                   APN_PROTO_UNSPEC, MTYPE_CAL_CDR_STR  },
   {MTYPE_CAL_EVENT,                 APN_PROTO_UNSPEC, MTYPE_CAL_EVENT_STR},
#ifdef HAVE_ENEA_ELEMENT
   {MTYPE_ENEA_DATA,                 APN_PROTO_UNSPEC, MTYPE_ENEA_DATA_STR   },
#endif
#ifdef HAVE_OPEN_SAF
   {MTYPE_OSAF_BMAP,                 APN_PROTO_UNSPEC, MTYPE_OSAF_BMAP_STR   },
   {MTYPE_OSAF_DEL_REC,              APN_PROTO_UNSPEC, MTYPE_OSAF_DEL_REC_STR},
   {MTYPE_OSAF_SECT,                 APN_PROTO_UNSPEC, MTYPE_OSAF_SECT_STR   },
   {MTYPE_OSAF_DATA,                 APN_PROTO_UNSPEC, MTYPE_OSAF_DATA_STR   },
   {MTYPE_OSAF_LUDATA,               APN_PROTO_UNSPEC, MTYPE_OSAF_LUDATA_STR },
#endif
#endif /* HAVE_HA */

   {MTYPE_FM,                        APN_PROTO_UNSPEC, MTYPE_FM_STR},
   {MTYPE_FM_LIB,                    APN_PROTO_UNSPEC, MTYPE_FM_LIB_STR},

   {MTYPE_LIB_VREP,                  APN_PROTO_UNSPEC, MTYPE_LIB_VREP_STR},

   {MTYPE_COMMSG,                    APN_PROTO_UNSPEC, MTYPE_COMMSG_STR},

   {MTYPE_ONM_BRIDGE,                APN_PROTO_ONM,    ONM_BRIDGE_STR},
   {MTYPE_ONM_VLAN_BMP,              APN_PROTO_ONM,    ONM_VLAN_BMP_STR},
   {MTYPE_ONM_VLAN,                  APN_PROTO_ONM,    ONM_VLAN_STR},
   {MTYPE_LLDP_IF,                   APN_PROTO_ONM,    LLDP_IF_STR},
   {MTYPE_LLDP_MASTER,               APN_PROTO_ONM,    LLDP_MASTER_STR},
   {MTYPE_LLDP_MSG_BUF,              APN_PROTO_ONM,    LLDP_MSG_BUF_STR},
   {MTYPE_REMOTE_LLDP,               APN_PROTO_ONM,    REMOTE_LLDP_STR},
   {MTYPE_REMOTE_VLAN,               APN_PROTO_ONM,    REMOTE_VLAN_STR},

   {MTYPE_EFM_MASTER,                APN_PROTO_ONM,    EFM_MASTER_STR},
   {MTYPE_EFM_IF,                    APN_PROTO_ONM,    EFM_IF_STR},
   {MTYPE_EFMOAM,                    APN_PROTO_ONM,    EFMOAM_STR},
   {MTYPE_EFM_MSG_BUF,               APN_PROTO_ONM,    EFM_MSG_BUF_STR},
   {MTYPE_EFM_EVLOG_ENTRY,           APN_PROTO_ONM,    EFM_EVLOG_STR},

   {MTYPE_CFM_MASTER,                APN_PROTO_ONM,    CFM_MASTER_STR},
   {MTYPE_CFM_MD,                    APN_PROTO_ONM,    CFM_MD_STR},
   {MTYPE_CFM_MA,                    APN_PROTO_ONM,    CFM_MA_STR},
   {MTYPE_CFM_MEP,                   APN_PROTO_ONM,    CFM_MEP_STR},
   {MTYPE_CFM_CC,                    APN_PROTO_ONM,    CFM_CC_STR},
   {MTYPE_CFM_LB,                    APN_PROTO_ONM,    CFM_LB_STR},
   {MTYPE_CFM_LT,                    APN_PROTO_ONM,    CFM_LT_STR},
   {MTYPE_CFM_FA,                    APN_PROTO_ONM,    CFM_FA_STR},
   {MTYPE_CFM_FRAME,                 APN_PROTO_ONM,    CFM_FR_STR},
   {MTYPE_CFM_PORT,                  APN_PROTO_ONM,    CFM_PORT_STR},
   {MTYPE_CFM,                       APN_PROTO_ONM,    CFM_STR},
   {MTYPE_CFM_LTM,                   APN_PROTO_ONM,    CFM_LTM_STR},
   {MTYPE_CFM_LTR_PDU,               APN_PROTO_ONM,    CFM_LTR_PDU_STR},
   {MTYPE_CFM_HEADER,                APN_PROTO_ONM,    CFM_HEADER_STR},
   {MTYPE_CFM_LTM_REPLY,             APN_PROTO_ONM,    CFM_LTM_REPLY_STR},
   {MTYPE_CFM_MSG_BUF,               APN_PROTO_ONM,    CFM_MSG_BUF_STR},
   {MTYPE_CFM_FNG,                   APN_PROTO_ONM,    CFM_FNG_STR},
   {MTYPE_CFM_IF,                    APN_PROTO_ONM,    CFM_IF_STR},
   {MTYPE_CFM_RMEP,                  APN_PROTO_ONM,    CFM_RMEP_STR},
   {MTYPE_CFM_MIP,                   APN_PROTO_ONM,    "CFM_MIP"},
   {MTYPE_CFM_LTQ,                   APN_PROTO_ONM,    CFM_LTQ_STR},
   {MTYPE_CFM_ERRCCM,                APN_PROTO_ONM,    CFM_ERRCCM_STR},
   {MTYPE_CFM_PROCESS,               APN_PROTO_ONM,    CFM_PROCESS_STR},
#if defined HAVE_CFM_Y1731 || defined HAVE_PBB_TE
   {MTYPE_CFM_LBR,                   APN_PROTO_ONM,    CFM_LBR_STR},
#endif /*HAVE_CFM_Y1731 || || defined HAVE_PBB_TE*/
#ifdef HAVE_CFM_Y1731
   {MTYPE_CFM_LM,                    APN_PROTO_ONM,    CFM_LM_STR},
   {MTYPE_CFM_DUAL_LM,               APN_PROTO_ONM,    CFM_LM_DUAL_STR},
   {MTYPE_CFM_LM_COUNT_INST,         APN_PROTO_ONM,    CFM_LM_COUNT_INST_STR},
   {MTYPE_CFM_1DM_TX,                APN_PROTO_ONM,    CFM_1DM_TX_STR},
   {MTYPE_CFM_1DM_RX,                APN_PROTO_ONM,    CFM_1DM_RX_STR},
   {MTYPE_CFM_1DM_RX_FRAME,          APN_PROTO_ONM,    CFM_1DM_RX_FR_STR},
   {MTYPE_CFM_DMM,                   APN_PROTO_ONM,    CFM_DMM_STR},
   {MTYPE_CFM_DMM_FRAME,             APN_PROTO_ONM,    CFM_DMM_FRAME_STR},
   {MTYPE_CFM_AIS,                   APN_PROTO_ONM,    CFM_AIS_STR},
   {MTYPE_CFM_AIS_RMEP_INST,         APN_PROTO_ONM,    CFM_AIS_RMEP_INST_STR},
   {MTYPE_CFM_SERVER_MEP,            APN_PROTO_ONM,    CFM_SERVER_MEP_STR},
   {MTYPE_CFM_SERVER_MEP_MSG_BUF,    APN_PROTO_ONM,    CFM_SERVER_MEP_MSG_BUF_STR},
   {MTYPE_CFM_LCK,                   APN_PROTO_ONM,    CFM_LCK_STR},
   {MTYPE_CFM_TST,                   APN_PROTO_ONM,    CFM_TST_STR},
   {MTYPE_CFM_TPUT_RX,               APN_PROTO_ONM,    CFM_TPUT_RX_STR},
   {MTYPE_CFM_MCC,                   APN_PROTO_ONM,    CFM_MCC_STR},
   {MTYPE_CFM_EXM,                   APN_PROTO_ONM,    CFM_EXM_STR},
   {MTYPE_CFM_VSM,                   APN_PROTO_ONM,    CFM_VSM_STR},
#endif /* HAVE_CFM_Y1731 */
#if defined HAVE_CFM && defined HAVE_PBB_TE
  {MTYPE_CFM_PBB_TE_SID_VLAN,          APN_PROTO_ONM,    "ONM PBB-TE"},
  {MTYPE_CFM_PBB_TE_VLAN,              APN_PROTO_ONM,    "CFM PBB VLAN"},
#if defined HAVE_I_BEB && defined HAVE_B_BEB
  {MTYPE_ONM_PBB_TE_INSTANCE,          APN_PROTO_ONM,    "ONM PBB-TE INSTANCE"},
  {MTYPE_ONM_PBB_TE_ESP_COMPONENT,    APN_PROTO_ONM,    "ONM PBB-TE COMPONENT"},
  {MTYPE_ONM_PBB_TE_PNP_IF_INDEX,      APN_PROTO_ONM,    "ONM PBB-TE PNP"},
#endif /* HAVE_I_BEB && HAVE_B_BEB  */
#endif /* HAVE_CFM && HAVE_PBB_TE */
#if defined HAVE_CFM && (defined HAVE_I_BEB || defined HAVE_B_BEB)
   {MTYPE_CFM_PBB_PORT_INFO,         APN_PROTO_ONM,    CFM_PBB_PORT_STR},
   {MTYPE_CFM_PBB_ISID_BVID_MAP,     APN_PROTO_ONM,    CFM_PBB_ISID_BVID_STR},
   {MTYPE_CFM_PBB_ISID_ON_BRIDGE,    APN_PROTO_ONM,    CFM_PBB_ISID_ON_BRIDGE_STR},


#endif /* HAVE_CFM && (defined HAVE_I_BEB || defined HAVE_B_BEB) */
   {MTYPE_CFM_VID_INFO,              APN_PROTO_ONM,    CFM_VID_INFO_STR},
   {MTYPE_CFM_DEFAULT_MD_LEVEL_TBL,  APN_PROTO_ONM,    CFM_DEFAULT_MD_LEVEL_TBL_STR},
   {MTYPE_CFM_DEFAULT_MD_LEVEL_TBL_ENTRY,  APN_PROTO_ONM,    CFM_DEFAULT_MD_LEVEL_TBL_ENTRY_STR},
   {MTYPE_CFM_VID_ACTIVE_LEVELS,     APN_PROTO_ONM,    CFM_VID_ACTIVE_LEVELS_STR},
   {MTYPE_CFM_CONFIG_ERROR,          APN_PROTO_ONM,    CFM_CONFIG_ERROR_STR},
   {MTYPE_ONM_PE_PORT,               APN_PROTO_ONM,    ONM_PE_PORT_STR},
#ifdef HAVE_SMI
  /** SMI SERVER **/
  {MTYPE_SMISERVER_ENTRY,             APN_PROTO_UNSPEC,  "MTYPE_SMISERVER_ENTRY"},
  {MTYPE_SMISERVER_CLIENT,            APN_PROTO_UNSPEC,  "MTYPE_SMISERVER_CLIENT"},
  {MTYPE_SMISERVER,                   APN_PROTO_UNSPEC,  "MTYPE_SMISERVER"},
  {MTYPE_SMI_MSG_QUEUE,               APN_PROTO_UNSPEC,  "MTYPE_SMI_MSG_QUEUE"},
  {MTYPE_SMI_MSG_QUEUE_BUF,           APN_PROTO_UNSPEC,  "MTYPE_SMI_MSG_QUEUE_BUF"},
  {MTYPE_SMICLIENT_HANDLER,           APN_PROTO_UNSPEC,  "MTYPE_SMICLIENT_HANDLER"},
  {MTYPE_SMICLIENT,                   APN_PROTO_UNSPEC,  "MTYPE_SMICLIENT"},
  {MTYPE_SMICLIENT_DUMMYMSG,          APN_PROTO_UNSPEC,  "MTYPE_SMICLIENT_DUMMYMSG"},
  {MTYPE_SMICLIENT_IF,                APN_PROTO_UNSPEC,  "MTYPE_SMICLIENT_IF"},
  {MTYPE_MSTP_GLOBAL,                 APN_PROTO_UNSPEC,  "MTYPE_MSTP_GLOBAL"},
  /** SMI CLIENT **/
  {MTYPE_SMICLIENT_GLOBAL,            APN_PROTO_UNSPEC,  "MTYPE_SMICLIENT_GLOBAL"},
  {MTYPE_SMI_PENDING_MSG,             APN_PROTO_UNSPEC,  "MTYPE_SMI_PENDING_MSG"},
#endif /* HAVE_SMI */

#ifdef HAVE_BFD
  /* BFD related header files */
  {MTYPE_BFD, APN_PROTO_OAM, "MTYPE_BFD"},
  {MTYPE_BFD_MASTER, APN_PROTO_OAM, "MTYPE_BFD_MASTER"},
  {MTYPE_BFD_NOTIFIER, APN_PROTO_OAM, "MTYPE_BFD_NOTIFIER"},
  {MTYPE_BFD_INTERFACE, APN_PROTO_OAM, "MTYPE_BFD_INTERFACE"},
  {MTYPE_BFD_MHOP_SESS_INFO, APN_PROTO_OAM, "MTYPE_BFD_MHOP_SESS_INFO"},
  {MTYPE_BFD_SESSION_PROTO_INFO, APN_PROTO_OAM, "MTYPE_BFD_SESSION_PROTO_INFO"},
  {MTYPE_BFD_SESSION, APN_PROTO_OAM, "MTYPE_BFD_SESSION"},
  {MTYPE_BFD_SESSION_FWD, APN_PROTO_OAM, "MTYPE_BFD_SESSION_FWD"},
  {MTYPE_BFD_SESSION_ADDL_PARAMS, APN_PROTO_OAM, "MTYPE_BFD_SESSION_ADDL_PARAMS"},

  /* BFD server.  */
  {MTYPE_BFD_SERVER, APN_PROTO_OAM, "MTYPE_BFD_SERVER"},
  {MTYPE_BFD_SERVER_ENTRY, APN_PROTO_OAM, "MTYPE_BFD_SERVER_ENTRY"},
  {MTYPE_BFD_MSG_QUEUE, APN_PROTO_OAM, "MTYPE_BFD_MSG_QUEUE"},
  {MTYPE_BFD_MSG_QUEUE_BUF, APN_PROTO_OAM, "MTYPE_BFD_MSG_QUEUE_BUF"},
  /* BFD client library.  */
  {MTYPE_BFD_CLIENT, APN_PROTO_OAM, "MTYPE_BFD_CLIENT"},
  {MTYPE_BFD_CLIENT_HANDLER, APN_PROTO_OAM, "MTYPE_BFD_CLIENT_HANDLER"},
  {MTYPE_BFD_PENDING_MSG, APN_PROTO_OAM, "MTYPE_BFD_PENDING_MSG"},
  /* */
#endif /* HAVE_BFD */

#ifdef HAVE_VLOGD
  {MTYPE_VLOG_GLOBAL,                  APN_PROTO_VLOG,  "MTYPE_VLOG_GLOBAL"},
  {MTYPE_VLOG_SRV_ENTRY,               APN_PROTO_VLOG,  "MTYPE_VLOG_SRV_ENTRY"},
  {MTYPE_VLOG_SRV,                     APN_PROTO_VLOG,  "MTYPE_VLOG_SRV"},
  {MTYPE_VLOG_TERM,                    APN_PROTO_VLOG,  "MTYPE_VLOG_TERM"},
  {MTYPE_VLOG_VR,                      APN_PROTO_VLOG,  "MTYPE_VLOG_VR"},
  {MTYPE_VLOG_CLIENT,                  APN_PROTO_VLOG,  "MTYPE_VLOG_CLIENT"},
  {MTYPE_VLOG_PAL,                     APN_PROTO_VLOG,  "MTYPE_VLOG_PAL"},
  {MTYPE_VLOG_FNAME,                   APN_PROTO_VLOG,  "MTYPE_VLOG_FNAME"},

#endif /* HAVE_VLOGD */

#ifdef HAVE_LMP
  {MTYPE_LMP,                     APN_PROTO_LMP, "MTYPE_LMP"},
  {MTYPE_LMP_MASTER,              APN_PROTO_LMP, "MTYPE_LMP_MASTER"},
  {MTYPE_LMP_CC,                  APN_PROTO_LMP, "MTYPE_LMP_CC"},
  {MTYPE_LMP_TELINK,              APN_PROTO_LMP, "MTYPE_LMP_TELINK"},
  {MTYPE_LMP_DLINK,               APN_PROTO_LMP, "MTYPE_LMP_DLINK"},
  {MTYPE_LMP_DLINK_HASH,          APN_PROTO_LMP, "MTYPE_LMP_DLINK_HASH"},
  {MTYPE_LMP_DLINK_TEST,          APN_PROTO_LMP, "MTYPE_LMP_DLINK_TESTMSG"},
  {MTYPE_LMP_ADJ,                 APN_PROTO_LMP, "MTYPE_LMP_ADJ"},
  {MTYPE_LMP_DL_OBJ,              APN_PROTO_LMP, "MTYPE_LMP_DL_OBJ"},
  {MTYPE_LMP_DL_SUBOBJ_ENCODE,    APN_PROTO_LMP, "MTYPE_LMP_DL_SUBOBJ_ENCODE"},
  {MTYPE_LMP_DL_SUBOBJ_WAVELENGTH,   APN_PROTO_LMP, \
                                              "MTYPE_LMP_DL_SUBOBJ_WAVELENGTH"},
  {MTYPE_LMP_TMP,                 APN_PROTO_LMP, "MTYPE_LMP_TMP"},
  {MTYPE_LMP_IF,                  APN_PROTO_LMP, "MTYPE_LMP_IF"},
  {MTYPE_LMP_TELINK_MSG,          APN_PROTO_LMP, "MTYPE_LMP_TELINK_MSG"},
  {MTYPE_LMP_TELINK_HASH,         APN_PROTO_LMP, "MTYPE_LMP_TELINK_HASH"},
  {MTYPE_LMP_FM,                  APN_PROTO_LMP, "MTYPE_LMP_FAULT_MGMT"},

#endif /* HAVE_LMP */

#ifdef HAVE_PBB_TE
  {MTYPE_PBB_TE_APS_GROUPS,             APN_PROTO_ONM,   "ONM PBB-TE APS"},
#endif /* HAVE_PBB_TE */

#ifdef HAVE_ELMID
  /*  ELMI related header files */
  {MTYPE_ELMI_GLOBAL,     APN_PROTO_ELMI, "MTYPE_ELMI_GLOBAL"},
  {MTYPE_ELMI_MASTER,     APN_PROTO_ELMI, "MTYPE_ELMI_MASTER"},
  {MTYPE_ELMI_BRIDGE,     APN_PROTO_ELMI, "MTYPE_ELMI_BRIDGE"},
  {MTYPE_ELMI_VLAN_BMP,   APN_PROTO_ELMI, "MTYPE_ELMI_VLAN_BMP"},
  {MTYPE_ELMI_VLAN,       APN_PROTO_ELMI, "MTYPE_ELMI_VLAN"},
  {MTYPE_ELMI_INTERFACE,  APN_PROTO_ELMI, "MTYPE_ELMI_INTERFACE"},
  {MTYPE_ELMI_PORT,       APN_PROTO_ELMI, "MTYPE_ELMI_PORT"},
  {MTYPE_ELMI_EVC,        APN_PROTO_ELMI, "MTYPE_ELMI_EVC"},
  {MTYPE_ELMI_CEVLAN_EVC, APN_PROTO_ELMI, "MTYPE_ELMI_CEVLAN_EVC"},
  {MTYPE_ELMI_UNI,        APN_PROTO_ELMI, "MTYPE_ELMI_UNI"},
  {MTYPE_ELMI_BW,         APN_PROTO_ELMI, "MTYPE_ELMI_BW"},
#endif /* HAVE_ELMID */

   {MTYPE_MAX,                       APN_PROTO_UNSPEC, MAX_STR}
};

/*
 *   Functions definitions
 *
 */

#if 0
void
memmgr_check()
{
  int i;

  for (i = 0; i < MTYPE_MAX; i++)
    if (mtypes[i].id != i)
      {
        printf("index %d %s is wrong\n", i, mtypes[i].desc);
        assert(0);
      }
}
#endif

/*
 *  memmgr_get_mtype_max ()
 *
 *  Return the maximum mtype value
 */
int
memmgr_get_mtype_max ()
{
    return MTYPE_MAX;
}

/*
 *  memmgr_get_mtype_owner()
 *
 *  returns owner module of a given mtype memory id
 */
int
memmgr_get_mtype_owner (int mtype)
{
    return mtypes[mtype].owner;
}

/*
 *  memmgr_map_mtype_index ()
 *
 *  Mtype id defined in memory.h is used as an index into mtype
 *  configuration table defined above and as well as mtype allocated
 *  table in memmgr.c. Make sure that the indexed mtype field has the
 *  same value before proceeding further. If not raise a flag.
 */
int
memmgr_map_mtype_index (int mtype)
{
    if (mtype != mtypes[mtype].id)
       printf("Mtype %d %s  id %d \n", mtype, memmgr_get_mtype_str(mtype), mtypes[mtype].id);

    return (mtype == mtypes[mtype].id) ? mtype : -1;
}

/*
 *  memmgr_get_mtype_str ()
 *
 *  return mtype description string
 */
char *
memmgr_get_mtype_str(int mtype)
{
    return mtypes[mtype].desc;
}

/*
 *  memmgr_ match_protocol_id ()
 *
 *  Return true if a given mtype has a matching protocol id
 */
int
memmgr_match_protocol_id (int pm, int mtype)
{
    /* lib/pal module is identified with two flags */
    if (pm == APN_PROTO_UNSPEC)
      return (mtypes[mtype].owner == pm ||
              mtypes[mtype].owner == APN_PROTO_MAX) ? 1 : -1;
    else
      return mtypes[mtype].owner == pm ? 1 : -1;
}


/*
 *  memmgr_qsort_mtype_comp()
 *
 *  Compare function for qsort
 *
 */
int
memmgr_qsort_mtype_comp(const void *entry_one, const void *entry_two)
{

   struct mtype_info *left =  (struct mtype_info *)entry_one;
   struct mtype_info *right = (struct mtype_info *)entry_two;

   if(left->id > right->id)
     return 1;
   else if (left->id < right->id)
     return -1;
   return 0;
}

/*
 *  memmgr_qsort_mtype_array()
 *
 *  Return void
 *
 */
void
memmgr_qsort_mtype_array(void)
{
    int mtypes_size;
    int entry_size = sizeof(struct mtype_info);

    /* Don't sort beyond array size - 1 */
    mtypes_size = (sizeof(mtypes)/entry_size) - 1;
    /* Sort the array */
    pal_qsort(mtypes,mtypes_size,entry_size,memmgr_qsort_mtype_comp);
}

